]> git.pld-linux.org Git - packages/apache.git/commitdiff
- waitforname conditionally only
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Wed, 22 Jun 2005 10:08:50 +0000 (10:08 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    apache.init -> 1.43

apache.init

index 034cfcc4bc53702bb10a1cb95bd9f130baf3bc0e..b575afcfae401f33e28ad3477969245cc8db0c59 100644 (file)
@@ -60,7 +60,8 @@ case "$1" in
        # Stop daemons.
        if [ -f /var/lock/subsys/httpd ]; then
                msg_stopping httpd.${HTTPD_MPM}
-               daemon --waitforname httpd.${HTTPD_MPM} --waitfortime 60 httpd.${HTTPD_MPM} $CFG -k stop
+               [ -n "$(pidofproc httpd.${HTTPD_MPM})" ] && OPT="--waitforname httpd.${HTTPD_MPM} --waitfortime 60" || OPT=
+               daemon $OPT httpd.${HTTPD_MPM} $CFG -k stop
                # Delete pidfile only when apache was called successfully
                if [ $? -eq 0 ]; then
                        rm -f /var/lock/subsys/httpd /var/run/httpd.pid /var/run/httpd.loc* >/dev/null 2>&1
This page took 0.083525 seconds and 4 git commands to generate.