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

Re: Bug#334824: logrotate: Postrotate documentation - Why restart?





--On October 21, 2005 12:14:47 PM +1000 Kai Hendry <hendry@iki.fi> wrote:

On 2005-10-21T00:49+0100 Paul Martin wrote:
On Thu, Oct 20, 2005 at 12:04:24PM +1000, Kai Hendry wrote:
> I don't understand why there is a need to restart the server in a
> postrotate using apache2 as an example.
> Could you or rather docs explain this better? :)
> I noticed this on RH machine for example:
>     postrotate
>         /bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` 2>
>         /dev/null || true
You'll have to ask the apache maintainer about this. The individual
/etc/logrotate.d/ scripts are provided with the package requesting the
rotation.

I posted to a RH list and I got quite a good response:

https://www.redhat.com/archives/nahant-list/2005-October/msg00246.html

I discovered a HUP signal causes Apache just to reload the configs.

https://www.redhat.com/archives/nahant-list/2005-October/msg00253.html

Though in Debian Unstable's /etc/logrotate.d/apache2 it actually does a
*restart* not a kill -HUP.

Which in /etc/init.d/apache2 issues a restart which actually stops the
server.

Is that a bug?


Not in SSL cases. If you have a new SSL cert apache will die when you HUP it instead of reloading. And no apachectl configtest or similar command can tell you about this state.



Reply to: