]> git.pld-linux.org Git - packages/apache.git/commitdiff
- bug fixes
authorwolf <wolf@pld-linux.org>
Mon, 9 Aug 2004 11:32:55 +0000 (11:32 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    apache.init -> 1.32

apache.init

index 41183ce5643768dad057b9497595aafe09e78b24..dcadaf92f2d0b99a0e8a7f9da20e6336ee0ae655 100644 (file)
@@ -61,8 +61,9 @@ case "$1" in
                        PID=0
                fi
                daemon httpd.${HTTPD_MPM} -f /etc/httpd/httpd.conf -k stop
+               RET=$?
                # Wait for httpd to really stop
-               if [ ! $PID -eq 0 ]; then
+               if [ ! $PID -eq 0 -a $RET -eq 0 ]; then
                        show "Waiting for httpd to stop"
                        busy
                        while ps -o command $PID | grep -q ^httpd
@@ -71,7 +72,10 @@ case "$1" in
                        done
                        ok
                fi
-               rm -f /var/lock/subsys/httpd /var/run/httpd.pid /var/run/httpd.loc* >/dev/null 2>&1
+               # Delete pidfile only when apache was called successfully
+               if [ $RET -eq 0 ]; then
+                       rm -f /var/lock/subsys/httpd /var/run/httpd.pid /var/run/httpd.loc* >/dev/null 2>&1
+               fi
        else
                msg_not_running httpd.${HTTPD_MPM}
        fi
This page took 0.043122 seconds and 4 git commands to generate.