I have a question about setting up a cron job for logrotate.
In my logrotate.conf I have a postrotate command line to restart syslog-ng.
/bin/kill -HUP `cat /var/run/syslog-ng.pid`
Will the -HUP command restart syslog-ng automatically? From the testing after the logrotate, the syslog files remain at zero k and syslog-ng keeps writing to the previous file. ie. messages.1 and not messages.
In my cron, do I need the event to start syslog-ng again? This seems to be the only way I can get syslog-ng to write to the new logs after a logrotate.
0 0 * * * root /opt/sbin/logrotate /opt/etc/logrotate.conf &>/dev/null
01 0 * * * root /opt/sbin/syslog-ng &>/dev/null