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

Bug 162520

Summary: www-servers/lighttpd init script support for "graceful"
Product: Gentoo Linux Reporter: Benjamin Podszun (Blafasel @ irc) <ben>
Component: [OLD] ServerAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED DUPLICATE    
Severity: enhancement    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Benjamin Podszun (Blafasel @ irc) 2007-01-17 11:31:27 UTC
Since version 1.4.3 lighttpd supports a graceful restart [1].

Support for this feature in our init script should be trivial. I don't have the original anymore now (no diff, sorry), but it only needs adding "graceful" to the opts definition and the following implementation:

graceful() {
        checkconfig || return 1

        local rv=0;
        ebegin "Closing the server socket for the running lighttpd"
        if kill -INT `cat ${LIGHTTPD_PID}` ; then
                rm -f ${LIGHTTPD_PID}
        else
                rv=1
        fi
        eend $rv

        start
}

Works fine for me so far.

[1]: http://blog.lighttpd.net/articles/2005/09/02/graceful-restart
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-01-17 11:32:50 UTC

*** This bug has been marked as a duplicate of bug 160939 ***