Closed hickey closed 3 years ago
Here is what I have been finding in my syslog:
Aug 15 06:34:46 mail logrotate: ALERT exited abnormally with [1]
Running manually to see what happens told me why logrotate
has been misbehaving:
root@mail:/var/log/clamav# logrotate /etc/logrotate.conf
error: stat of /var/log/clamav/clamav.log failed: No such file or directory
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of rotate.
root@mail:/var/log/clamav# echo $?
1
Thanks for helping. :)
/etc/logrotate.d/clamav-daemon is expecting to have the log file located at /var/log/clamav/clamav.log. This changes rsyslog to send log events to clamav.log instead of clamd.log so that logrotate will correctly rotate files rather than move them and have rsyslog continue using file handles that point to the first rotation of the log file.