Skip to content
Snippets Groups Projects

update find command

Merged Hahn Axel (hahn) requested to merge 5213-handle-dns-alias-domain into master
1 file
+ 4
4
Compare changes
  • Side-by-side
  • Inline
+ 4
4
@@ -526,18 +526,18 @@ function public_list-old(){
@@ -526,18 +526,18 @@ function public_list-old(){
echo "Cert dir is $( pwd )"
echo "Cert dir is $( pwd )"
echo
echo
echo "---- Certificates expiring soon - with age $_iWarn ... $_iRuntime days:"
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
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
_rc=1
else
else
echo " NONE."
echo " NONE."
fi
fi
echo
echo
echo "---- Certificate list ... older $_iRuntime days:"
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
then
find -type d -mtime +$_iRuntime -exec ls -ld {} \; | nl
find -type f -name "*.cert.cer" -mtime +$_iRuntime -exec ls -ld {} \; | nl
_rc=2
_rc=2
else
else
echo " NONE."
echo " NONE."
Loading