SOURCES: apache.init - waitforname conditionally only

arekm arekm at pld-linux.org
Wed Jun 22 12:08:55 CEST 2005


Author: arekm                        Date: Wed Jun 22 10:08:55 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- waitforname conditionally only

---- Files affected:
SOURCES:
   apache.init (1.42 -> 1.43) 

---- Diffs:

================================================================
Index: SOURCES/apache.init
diff -u SOURCES/apache.init:1.42 SOURCES/apache.init:1.43
--- SOURCES/apache.init:1.42	Wed May 18 18:46:43 2005
+++ SOURCES/apache.init	Wed Jun 22 12:08:50 2005
@@ -60,7 +60,8 @@
 	# 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
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/apache.init?r1=1.42&r2=1.43&f=u




More information about the pld-cvs-commit mailing list