logrotate with only one SIGHUP for two log paths

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hi,

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
path /data/log/web/*

The first idea is to create an additional logrotate file called for
example /etc/logrotate.d/httpd-custom like this:

/data/log/web/* {
...(specific configuration, compress & co)...
    sharedscript
    postrotate
        /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
experience with...)

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 !

-- 
Martin
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux