Räuber Hotzenplotz
Newbie
Hallo,
ich habe Logrotate so eingestellt, daß die Logdateien täglich rotiert werden. Soweit ales OK.
Das Ergebnis ist, daß zwar täglich rotiert wird, jedoch jeden Tag exakt 15 Minuten später als am Vortag.
Wie und wo stell ich ein, daß logrotate pünktlich um Mitternacht loslegt?
Ein
funktioniert zwar, ist aber nicht wirklich sexy.
Gruß und Dank,
Hotzi
ich habe Logrotate so eingestellt, daß die Logdateien täglich rotiert werden. Soweit ales OK.
Code:
#cat /etc/cron.daily/logrotate
#!/bin/sh
/usr/sbin/logrotate /etc/logrotate.conf
EXITVALUE=$?
if [ $EXITVALUE != 0 ]; then
/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
fi
exit 0
Code:
#cat /etc/logrotate.d/syslog
/var/log/warn /var/log/messages /var/log/allmessages /var/log/localmessages /var/log/firewall {
compress
daily
delaycompress
rotate 7
dateext
maxage 30
missingok
notifempty
create 640 root admin
sharedscripts
postrotate
/etc/init.d/syslog reload
endscript
}
...
Das Ergebnis ist, daß zwar täglich rotiert wird, jedoch jeden Tag exakt 15 Minuten später als am Vortag.
Wie und wo stell ich ein, daß logrotate pünktlich um Mitternacht loslegt?
Ein
Code:
crontab -l
0 0 * * * /usr/sbin/logrotate /etc/logrotate.conf
Gruß und Dank,
Hotzi