From a54142ecf0d8d55c7480feadf87bd7176542d943 Mon Sep 17 00:00:00 2001
From: "Hahn Axel (hahn)" <axel.hahn@iml.unibe.ch>
Date: Mon, 4 Apr 2022 11:51:12 +0200
Subject: [PATCH] update find command

---
 cm.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/cm.sh b/cm.sh
index 94821ac..7391cf8 100755
--- a/cm.sh
+++ b/cm.sh
@@ -526,18 +526,18 @@ function public_list-old(){
 	echo "Cert dir is $( pwd )"
 	echo
 	echo "---- Certificates expiring soon - with age $_iWarn ... $_iRuntime days:"
-	if find -type d -mtime +$_iWarn -mtime -$_iRuntime | grep . >/dev/null
+	if find -type f -name "*.cert.cer" -mtime +$_iWarn -mtime -$_iRuntime | grep . >/dev/null
 	then
-		find -type d -mtime +$_iWarn -mtime -$_iRuntime  -exec ls -ld {} \; | nl
+		find -type f -name "*.cert.cer" -mtime +$_iWarn -mtime -$_iRuntime  -exec ls -ld {} \; | nl
 		_rc=1
 	else 
 		echo "     NONE."
 	fi
 	echo
 	echo "---- Certificate list ... older $_iRuntime days:"
-	if find -type d -mtime +$_iRuntime | grep . >/dev/null
+	if find -type f -name "*.cert.cer" -mtime +$_iRuntime | grep . >/dev/null
 	then
-		find -type d -mtime +$_iRuntime -exec ls -ld {} \; | nl
+		find -type f -name "*.cert.cer" -mtime +$_iRuntime -exec ls -ld {} \; | nl
 		_rc=2
 	else
 		echo "     NONE."
-- 
GitLab