* Dan Wilga <[EMAIL PROTECTED]> [2002-04-09 10:19]: > It's most likely that the stop is actually taking longer than you > expect to process. Apachectl just sends the "kill" and doesn't wait > around for everything to exit. Depending on what each of the children > is doing, this can take awhile. So the better approach is not to > "stop" again but, if "start" fails, wait a few seconds and try the > start again.
For exactly this reason, I always modify apachectl so that the restart option looks like: restart) timeout=${2:-5} count=0 $0 stop while [ $count -lt $timeout ]; do echo -n ". " sleep 1 count=`expr $count + 1` done echo "" $0 start ;; This will sleep for $2 (or 5 seconds) between stopping and starting. The sleep ensures that the start doesn't get called too quickly. Use it like: apachectl restart 10 to wait 10 seconds, or apachectl restart to wait the default 5. (darren) -- Fanaticism consists in redoubling your efforts when you have forgotten your aim. -- George Santayana