Nate, You need to add the option "sharedscripts", which only runs the script once for all the matches, e.g. the Red Hat syslog file is: /var/log/messages /var/log/secure /var/log/maillog /var/log/spooler /var/log/boot.log /var/log/cron { sharedscripts postrotate /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true endscript } BTW, I don't think this option was in the original logrotate, but I know it has been around for a while. I've seen it since at least Red Hat 7.1. Frank On Fri, 2003-04-11 at 01:18, nate wrote:
Nate
Why didn't you just modify the logrotate script for syslog?... else how is your own script called when a rotation happens?
I did originally call the script from the "postrotate" option within logrotate.. but that didn't work so hot, turns out the postrotate option is called after every log, so in my case /var/log-ng/* restarted syslog-ng about 30 times. I suppose I could create an entry for every log but that would mean more long term maintainence of the file for the new messages.* files that are from new hosts.
unless theres another way..
nate
_______________________________________________ syslog-ng maillist - syslog-ng@lists.balabit.hu https://lists.balabit.hu/mailman/listinfo/syslog-ng Frequently asked questions at http://www.campin.net/syslog-ng/faq.html
-- ac3 Suite G16, Bay 7, Locomotive Workshop Phone: 02 9209 4600 Australian Technology Park Fax: 02 9209 4611 Eveleigh NSW 1430