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

Logrotate



Hello,

I am having trouble understanding the following /etc/logrotate.d/ file

httpd:

/var/log/httpd/*log {
    missingok
    notifempty
    sharedscripts
    postrotate
/bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` 2> /dev/null || true
    endscript
}
~

The " /bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` 2> /dev/null || true " line apparently means "kill the httpd daemon". But why would you want to kill the httpd daemon after rotating the logs? Furthermore, what is "|| true" at the end of the line, for?

Furthermore, how would you write the above configuration file to rotate log files whose names contain the current date (e.g., 20050606.log, 20050607.log, etc.)?

Many thanks.

philippe



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