]> git.pld-linux.org Git - packages/lighttpd.git/blobdiff - lighttpd.init
- fixed useradd, rel 2
[packages/lighttpd.git] / lighttpd.init
index d13505de991de46e8cf97474018bdd152eb92e7b..36ddf4723cf40fe1eda7b58ad2aa0a5b7a135320 100644 (file)
@@ -45,7 +45,7 @@ case "$1" in
        # Stop daemons.
        if [ -f /var/lock/subsys/lighttpd ]; then
                msg_stopping lighttpd
-               killproc lighttpd
+               killproc --pidfile /var/run/lighttpd.pid lighttpd
                rm -f /var/lock/subsys/lighttpd >/dev/null 2>&1
        else
                msg_not_running lighttpd
@@ -56,13 +56,19 @@ case "$1" in
        RETVAL=$?
        ;;
   restart)
-       $0 stop
+       if [ -f /var/lock/subsys/lighttpd ]; then
+               msg_stopping lighttpd
+               # sending INT signal will make lighttpd close all listening sockets and
+               # wait for client connections to terminate.
+               killproc --pidfile /var/run/lighttpd.pid lighttpd -INT
+               rm -f /var/lock/subsys/lighttpd >/dev/null 2>&1
+       fi
        $0 start
        ;;
   reload|force-reload|graceful)
        if [ -f /var/lock/subsys/lighttpd ]; then
                msg_reloading lighttpd
-               killproc lighttpd -HUP
+               killproc --pidfile /var/run/lighttpd.pid lighttpd -HUP
                RETVAL=$?
        else
                msg_not_running lighttpd
This page took 0.042162 seconds and 4 git commands to generate.