ref: 92edb4bfea126fecf69586dec6a95bc52812283c
parent: 15cde29629e8ecd1952e791996a2fc517337bbdd
author: Stephen Jones <smj@9p.sdf.org>
date: Sun Oct 17 21:41:03 EDT 2021
added chmod +a to active file
--- a/logrotate
+++ b/logrotate
@@ -5,7 +5,7 @@
# 0 0 * * 0 $sysname /usr/glenda/bin/logrotate
#
logdir=/sys/log
-logfiles=(auth cpu cron dns gemini listen mail runq smtp smtp.fail smtpd)
+logfiles=(auth cpu cron dns gemini httpd/log listen mail runq smtp smtp.fail smtpd)
generations=14
maxsize=1024000
@@ -26,6 +26,10 @@
}
gzip -c $logdir/$1 > $logdir/$1.0.gz
+ rm -f $logdir/$i
+ touch $logdir/$i
+ chmod 0662 $logdir/$i
+ chmod +a $logdir/$i
}
for(i in $logfiles){
@@ -33,13 +37,6 @@
size=`{du -n $logdir/$i|awk '{print $1}'}
if(test $size -gt $maxsize){
Rotate $i
- #
- # I is dum - logfile are open/append at boot so I caveman smash. help me.
- #
- rm -f $logdir/$i
- touch $logdir/$i
- chmod 0662 $logdir/$i
- chmod +t $logdir/$i
}
}
}