*** apache2.ORIG Sun Feb 4 14:20:34 2007 --- apache2 Sun Feb 4 15:26:25 2007 *************** *** 78,83 **** --- 78,96 ---- checkconfig || return 1 ebegin "Stopping apache2" ${APACHE2} ${APACHE2_OPTS} -k stop + + # Wait for apache to actually stop before reporting so + for i in `seq 1 30` ; do + if [ "`ps -ef | awk '/\/usr\/sbin\/apache2/'`" == '' ] ; then + # Apache has stopped + break + else + echo " ^-- Waiting for apache to stop..." + fi; + sleep 1 + done + + eend $? }