--- /etc/init.d/apache2.orig 2011-11-19 15:24:52.534876326 +0800 +++ /etc/init.d/apache2 2011-11-19 15:24:37.184953058 +0800 @@ -102,7 +102,7 @@ ${APACHE2} ${APACHE2_OPTS} -k stop i=0 - while ( ! test -f "${PIDFILE}" && pgrep -P ${PID} apache2 >/dev/null ) \ + while ( test -f "${PIDFILE}" && pgrep -P ${PID} apache2 >/dev/null ) \ && [ $i -lt ${TIMEOUT} ]; do sleep 1 && i=$(expr $i + 1) done