--- /common/apache 2004-11-10 16:26:47.000000000 +0100 +++ /etc/init.d/apache 2004-11-10 16:21:30.000000000 +0100 @@ -12,10 +12,6 @@ } start() { - ebegin "Cleaning /tmp/phpa_*" - touch /tmp/phpa_1 - find /tmp/ -name 'phpa_*' -print0 | xargs -0 rm - eend $? ebegin "Starting apache" env -i PATH=$PATH /sbin/start-stop-daemon -o --quiet \ --start --startas /usr/sbin/apache \ @@ -27,7 +23,10 @@ ebegin "Stopping apache" /usr/sbin/apachectl stop >/dev/null start-stop-daemon -o --quiet --stop --pidfile /var/run/apache.pid - eend $? + ERROR=$? + while ps -U apache|grep apache >/dev/null ; do sleep 1; ebegin " Waiting for apache to stop"; done + rm /var/run/apache.pid 2>/dev/null + eend $ERROR } reload() {