add log file rotation

This commit is contained in:
Beth Parker 2025-03-22 20:00:26 -05:00
parent 4a4275cb0c
commit fb45d990e1

View file

@ -3,6 +3,8 @@ dom=`date +%d`
today=`date +%Y%m%d`
log=/var/log/certbot-renewal.log
echo Renewal attempt for $today >> $log
#rotate log file every month
if [[ $dom = 1 ]];then mv $log $log.bak;fi
for f in `ls /etc/letsencrypt/live/ --ignore "README"`
do
echo Checking $f >> $log