Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 134291

Summary: apache2 logrotate script enhancement - graceful restart
Product: Gentoo Linux Reporter: Tomasz Orzechowski <apache-restart-gentoo-bug>
Component: [OLD] ServerAssignee: Apache Team - Bugzilla Reports <apache-bugs>
Status: RESOLVED INVALID    
Severity: enhancement    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Tomasz Orzechowski 2006-05-25 00:59:30 UTC
the /etc/logrotate.d/apache2 script should be modified to do a kill -USR1 on apache, not execute /etc/init.d/apache2 reload

sending the signal to apache tells it to reload its config, close and reopen all open files, but without interrupting requests already in progress.

the change would be along the lines of:

9c9
<   kill -USR1 `cat /var/run/apache2.pid`
---
>   /etc/init.d/apache2 reload > /dev/null 2>&1 || true
Comment 1 Michael Stewart (vericgar) (RETIRED) gentoo-dev 2006-05-25 09:49:18 UTC
kill -USR1 and /etc/init.d/apache2 reload are the same thing. reload does a graceful restart of apache, which is what the USR1 signal triggers.

http://httpd.apache.org/docs/2.0/stopping.html#graceful