Logrotate Mechanics

Mikkel L. Ellertson mikkel at infinity-ltd.com
Sat Mar 4 17:19:51 UTC 2006


David Cary Hart wrote:
> Typically, the post rotate script looks like:
> /bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` \
>                  2> /dev/null || true
> 
> I get "cat /var/run/httpd.pid" to identify the process. In this case,
> what restarts httpd?
It does not get stopped. What the kill command is doing is sending
httpd the -HUP signal. This causes it to close and re-open the log
files, so it uses the new file, instead of the old file that was
processed by logrotate. The -HUP signal is commonly used to tell
a daemon to re-read its config file, or to re-open its log files.

Mikkel
-- 

  Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!




More information about the fedora-list mailing list