Comment 6 for bug 393792

Revision history for this message
Daniel Hahler (blueyed) wrote :

I could not find any documentation, if "reload" should start a not already running service.
("9.3.2 Writing the scripts" in the Debian Policy Manual (http://www.debian.org/doc/debian-policy/ch-opersys.html) talks about this)

However, Apache does the same (via "apache2ctl graceful"):
$ sudo apache2ctl graceful
httpd not running, trying to start

But, apache2's logrotate script checks if it is running:
        postrotate
                if [ -f "`. /etc/apache2/envvars ; echo ${APACHE_PID_FILE:-/var/run/apache2.pid}`" ]; then
                        /etc/init.d/apache2 reload > /dev/null
                fi
        endscript

I think the same should get done for lighttpd's logrotate script, too.
I'm adding an apache2 task.