From 2668f73dafa4df2605da17a0d4178b7a016b8b47 Mon Sep 17 00:00:00 2001 From: Guido van Rooij Date: Thu, 11 Aug 1994 17:23:29 +0000 Subject: [PATCH] Add rotattion of cron log to weekly. Reviewed by: Submitted by: guido --- etc/weekly | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/etc/weekly b/etc/weekly index 42a32f993215..68590f084aa2 100644 --- a/etc/weekly +++ b/etc/weekly @@ -54,6 +54,16 @@ chmod 644 messages kill -1 `cat /var/run/syslog.pid` cd / +echo "Rotating cron log:" +cd /var/cron +if [ -f log.2 ]; then mv -f log.2 log.3; fi +if [ -f log.1 ]; then mv -f log.1 log.2; fi +if [ -f log.0 ]; then mv -f log.0 log.1; fi +mv -f log log.0 +cp /dev/null log +chmod 600 log +cd / + echo "" echo "Rebuilding locate database:" echo /usr/libexec/locate.updatedb | nice -5 su -m nobody 2>/dev/null