]> git.pld-linux.org Git - packages/apache.git/commitdiff
- wait for httpd to really stop
authorwolf <wolf@pld-linux.org>
Fri, 30 Jul 2004 14:22:03 +0000 (14:22 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    apache.init -> 1.27

apache.init

index 468da5459de4e52f1ce1569aad350cb2c4e7c188..8203f33bd7ff136ad7e6ea8a51e72fc4831ff132 100644 (file)
@@ -52,7 +52,22 @@ case "$1" in
        # Stop daemons.
        if [ -f /var/lock/subsys/httpd ]; then
                msg_stopping httpd.${HTTPD_MPM}
+               if [ -f /var/run/httpd.pid ]; then
+                       PID=`cat /var/run/httpd.pid`
+               else
+                       PID=0
+               fi
                daemon httpd.${HTTPD_MPM} -f /etc/httpd/httpd.conf -k stop
+               # Wait for httpd to really stop
+               if [ ! $PID -eq 0 ]; then
+                       show "Waiting for httpd to stop"
+                       busy
+                       while ps ax | grep $PID.\*httpd > /dev/null
+                       do
+                               sleep 1
+                       done
+                       ok
+               fi
                rm -f /var/lock/subsys/httpd /var/run/httpd.pid /var/run/httpd.loc* >/dev/null 2>&1
        else
                msg_not_running httpd.${HTTPD_MPM}
This page took 0.077422 seconds and 4 git commands to generate.