According to Marc Slemko:
> restart)
> [ $RUNNING -eq 1 ] && {
> kill -HUP $PID
> # XXX check to see it doesn't die trying to restart
> }
> [ $RUNNING -eq 0 ] && {
> echo "$0: restart: httpd not running, starting"
> $HTTPD && echo httpd server started
> }
> ;;
There should also be a 'graceful restart' switch.
Some time ago I wrote a little script (a hack :-)) for that purpose which
checks the error.log if the (graceful) restart succeeded.
Currently I cannot post it, because the mainboard of the machine with the recent
version of the script died some days ago...
> status)
> [ $RUNNING -eq 0 ] && {
> echo "$0: status: httpd not running"
> continue
> }
> lynx -dump http://localhost/server-status
Maybe it's a good idea to let the user set lynx and the url in a variable
and maybe allow him/her to disable it completely (if there is no lynx
installed on the machine or server-status is not used).
ciao...
--
Lars Eilebrecht
sfx@unix-ag.org
|