mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-30 21:43:34 +00:00
Add rotattion of cron log to weekly.
Reviewed by: Submitted by: guido
This commit is contained in:
parent
6aab3b5a6d
commit
2668f73daf
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=2031
10
etc/weekly
10
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
|
||||
|
Loading…
Reference in New Issue
Block a user