apachectl.in revision 46e1eb6b9a3d4c1c4766e05b94181818c14e00e5
6ae232055d4d8a97267517c5e50074c2c819941and# Copyright (c) 2000-2001 The Apache Software Foundation.
6ae232055d4d8a97267517c5e50074c2c819941and# See license at the end of this file.
6ae232055d4d8a97267517c5e50074c2c819941and# Apache control script designed to allow an easy command line interface
6ae232055d4d8a97267517c5e50074c2c819941and# to controlling Apache. Written by Marc Slemko, 1997/08/23
6ae232055d4d8a97267517c5e50074c2c819941and# The exit codes returned are:
6ae232055d4d8a97267517c5e50074c2c819941and# 0 - operation completed successfully
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen# 2 - usage error
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen# 3 - httpd could not be started
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen# 4 - httpd could not be stopped
6ae232055d4d8a97267517c5e50074c2c819941and# 5 - httpd could not be started during a restart
6ae232055d4d8a97267517c5e50074c2c819941and# 6 - httpd could not be restarted during a restart
6ae232055d4d8a97267517c5e50074c2c819941and# 7 - httpd could not be restarted during a graceful restart
d229f940abfb2490dee17979e9a5ff31b7012eb5rbowen# 8 - configuration syntax error
6ae232055d4d8a97267517c5e50074c2c819941and# When multiple arguments are given, only the error from the _last_
6ae232055d4d8a97267517c5e50074c2c819941and# one is reported. Run "apachectl help" for usage info
6ae232055d4d8a97267517c5e50074c2c819941and# |||||||||||||||||||| START CONFIGURATION SECTION ||||||||||||||||||||
6ae232055d4d8a97267517c5e50074c2c819941and# -------------------- --------------------
b43f840409794ed298e8634f6284741f193b6c4ftakashi# the path to your PID file
f086b4b402fa9a2fefc7dda85de2a3cc1cd0a654rjung# the path to your httpd binary, including options if necessary
b43f840409794ed298e8634f6284741f193b6c4ftakashi# a command that outputs a formatted text version of the HTML at the
b43f840409794ed298e8634f6284741f193b6c4ftakashi# url given on the command line. Designed for lynx, however other
b43f840409794ed298e8634f6284741f193b6c4ftakashi# programs may work.
6ae232055d4d8a97267517c5e50074c2c819941and# the URL to your server's mod_status status page. If you do not
6ae232055d4d8a97267517c5e50074c2c819941and# have one, then status and fullstatus will not work.
6ae232055d4d8a97267517c5e50074c2c819941and# -------------------- --------------------
6ae232055d4d8a97267517c5e50074c2c819941and# |||||||||||||||||||| END CONFIGURATION SECTION ||||||||||||||||||||
6ae232055d4d8a97267517c5e50074c2c819941and # check for pidfile
6ae232055d4d8a97267517c5e50074c2c819941and if [ -f $PIDFILE ] ; then
6ae232055d4d8a97267517c5e50074c2c819941and echo "$0 $ARG: @progname@ (pid $PID) already running"
6ae232055d4d8a97267517c5e50074c2c819941and echo "$0 $ARG: @progname@ started"
6ae232055d4d8a97267517c5e50074c2c819941and echo "$0 $ARG: @progname@ could not be started"
6ae232055d4d8a97267517c5e50074c2c819941and echo "$0 $ARG: @progname@ (pid $PID) already running"
6ae232055d4d8a97267517c5e50074c2c819941and echo "$0 $ARG: @progname@ started"
6ae232055d4d8a97267517c5e50074c2c819941and echo "$0 $ARG: @progname@ could not be started"
6ae232055d4d8a97267517c5e50074c2c819941and if kill $PID ; then
6ae232055d4d8a97267517c5e50074c2c819941and echo "$0 $ARG: @progname@ stopped"
6ae232055d4d8a97267517c5e50074c2c819941and echo "$0 $ARG: @progname@ could not be stopped"
6ae232055d4d8a97267517c5e50074c2c819941and echo "$0 $ARG: @progname@ not running, trying to start"
6ae232055d4d8a97267517c5e50074c2c819941and echo "$0 $ARG: @progname@ started"
6ae232055d4d8a97267517c5e50074c2c819941and echo "$0 $ARG: @progname@ could not be started"
6ae232055d4d8a97267517c5e50074c2c819941and echo "$0 $ARG: @progname@ restarted"
6ae232055d4d8a97267517c5e50074c2c819941and echo "$0 $ARG: @progname@ could not be restarted"
6ae232055d4d8a97267517c5e50074c2c819941and echo "$0 $ARG: configuration broken, ignoring restart"
6ae232055d4d8a97267517c5e50074c2c819941and echo "$0 $ARG: (run 'apachectl configtest' for details)"
6ae232055d4d8a97267517c5e50074c2c819941and echo "$0 $ARG: @progname@ not running, trying to start"
6ae232055d4d8a97267517c5e50074c2c819941and echo "$0 $ARG: @progname@ started"
6ae232055d4d8a97267517c5e50074c2c819941and echo "$0 $ARG: @progname@ could not be started"
6ae232055d4d8a97267517c5e50074c2c819941and echo "$0 $ARG: @progname@ gracefully restarted"
6ae232055d4d8a97267517c5e50074c2c819941and echo "$0 $ARG: @progname@ could not be restarted"
6ae232055d4d8a97267517c5e50074c2c819941and echo "$0 $ARG: configuration broken, ignoring restart"
6ae232055d4d8a97267517c5e50074c2c819941and echo "$0 $ARG: (run 'apachectl configtest' for details)"
6ae232055d4d8a97267517c5e50074c2c819941and $LYNX $STATUSURL | awk ' /process$/ { print; exit } { print } '
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedooh echo "usage: $0 (start|stop|restart|fullstatus|status|graceful|configtest|help)"
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedoohstart - start @progname@
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedoohstartssl - start @progname@ with SSL enabled
b43f840409794ed298e8634f6284741f193b6c4ftakashistop - stop @progname@
d229f940abfb2490dee17979e9a5ff31b7012eb5rbowenrestart - restart @progname@ if running by sending a SIGHUP or start if
7fec19672a491661b2fe4b29f685bc7f4efa64d4nd not running
7fec19672a491661b2fe4b29f685bc7f4efa64d4ndfullstatus - dump a full status screen; requires lynx and mod_status enabled
7fec19672a491661b2fe4b29f685bc7f4efa64d4ndstatus - dump a short status screen; requires lynx and mod_status enabled
7fec19672a491661b2fe4b29f685bc7f4efa64d4ndgraceful - do a graceful restart by sending a @AP_SIG_GRACEFUL@ or start if not running
6ae232055d4d8a97267517c5e50074c2c819941andconfigtest - do a configuration syntax test
exit $ERROR
# Apache Software Foundation (http://www.apache.org/)."