On 15 May 2002, Jeff Trawick wrote:

> Joshua Slive <[EMAIL PROTECTED]> writes:
>
> > What about
> >
> > - Incorporate the restart stuff into httpd
> > - Make apachectl a simple shell script that just sets up the environment
> > and calls httpd
> > - Encourage everyone to use apachectl
>
> Would the syntax for start/restart/configtest be exactly the same as
> current apachectl, or would it be changed?  (I think it would be
> changed to use "-k keyword" for apachectl options that don't
> correspond directly to existing httpd options.)
>

It would be very nice if "httpd graceful" could be made a synonym
for "httpd -k graceful", but I don't think the current getopt
stuff will handle that.  Otherwise, I would favor an apachectl
that looks something like

#!/bin/sh
# pick up any necessary environment variables
if test -f @exp_bindir@/envvars; then
  . @exp_bindir@/envvars
fi

case $@ in
    start)
       shift 1
       ;;
    stop)
       COMMAND=-k stop
       shift 1
       ;;
    graceful)
       COMMAND=-k graceful
       shift 1
       ;;
# etc...

httpd $COMMAND $@

(Please excuse the horrible shell script, but you get the point.)

Possibly with a "this is deprecated please use -k" message
in the appropriate places.

This is not perfectly compatible with apachectl, but it is pretty
close, and very much simpler.

Joshua.

Reply via email to