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

Re: Logrotate Mechanics



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!


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