I have a logrotate script that is structured to rotate logs collected by syslog. Part of that script is to reload the syslog process. The problem is that the syslog reload runs for each matching log file it rotates and there are about 100 of them. How can I set up the logrotate script to reload the syslog process only once, after all individual logs have been processed?
/logs/* {
daily
rotate 7
compress
postrotate
/etc/init.d/syslog-ng reload 2>/dev/null
endscript
}