httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lars Eilebrecht <Lars.Eilebre...@unix-ag.org>
Subject Re: ndc-type script for manipulating httpd
Date Sun, 10 Aug 1997 12:12:55 GMT
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

Mime
View raw message