Logrotate

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

 



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

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux