[CentOS] logrotate with only one SIGHUP for two log paths
mh at accelance.fr
Fri Mar 30 09:27:13 UTC 2007
Not easy to write a quick subject about why i'm going to ask you !
I'm trying to rotate logs from an unique service (ie. apache) but
located in two different locations; /var/log/httpd/ and /data/log/web/
I want /var/log/httpd/* to stay as it comes with the distribution and do
a specific rotation configuration for logs in the second
The first idea is to create an additional logrotate file called for
example /etc/logrotate.d/httpd-custom like this:
...(specific configuration, compress & co)...
/bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` 2> /dev/null || true
Problem : if both /data/log/web/* and /var/log/httpd/* is going to be
rotated, TWO SIGHUP will be issued : i don't like this (I have bad
So here is my question : is it possible to do a similar configuration
with only ONE SIGHUP if a rotation happen on one log ?
Thank you !
More information about the CentOS