3
# Licensed to the Apache Software Foundation (ASF) under one or more
4
# contributor license agreements. See the NOTICE file distributed with
5
# this work for additional information regarding copyright ownership.
6
# The ASF licenses this file to You under the Apache License, Version 2.0
7
# (the "License"); you may not use this file except in compliance with
8
# the License. You may obtain a copy of the License at
10
# http://www.apache.org/licenses/LICENSE-2.0
12
# Unless required by applicable law or agreed to in writing, software
13
# distributed under the License is distributed on an "AS IS" BASIS,
14
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
# See the License for the specific language governing permissions and
16
# limitations under the License.
19
# Apache control script designed to allow an easy command line interface
20
# to controlling Apache. Written by Marc Slemko, 1997/08/23
22
# The exit codes returned are:
23
# XXX this doc is no longer correct now that the interesting
24
# XXX functions are handled by httpd
25
# 0 - operation completed successfully
28
# 3 - httpd could not be started
29
# 4 - httpd could not be stopped
30
# 5 - httpd could not be started during a restart
31
# 6 - httpd could not be restarted during a restart
32
# 7 - httpd could not be restarted during a graceful restart
33
# 8 - configuration syntax error
35
# When multiple arguments are given, only the error from the _last_
36
# one is reported. Run "apachectl help" for usage info
40
# |||||||||||||||||||| START CONFIGURATION SECTION ||||||||||||||||||||
41
# -------------------- --------------------
43
# the path to your httpd binary, including options if necessary
44
HTTPD='@exp_sbindir@/@progname@'
46
# pick up any necessary environment variables
47
if test -f @exp_sbindir@/envvars; then
48
. @exp_sbindir@/envvars
51
# a command that outputs a formatted text version of the HTML at the
52
# url given on the command line. Designed for lynx, however other
54
LYNX="@LYNX_PATH@ -dump"
56
# the URL to your server's mod_status status page. If you do not
57
# have one, then status and fullstatus will not work.
58
STATUSURL="http://localhost:@PORT@/server-status"
60
# Set this variable to a command that increases the maximum
61
# number of file descriptors allowed per child process. This is
62
# critical for configurations that use many file descriptors,
63
# such as mass vhosting, or a multithreaded server.
64
ULIMIT_MAX_FILES="@APACHECTL_ULIMIT@"
65
# -------------------- --------------------
66
# |||||||||||||||||||| END CONFIGURATION SECTION ||||||||||||||||||||
68
# Set the maximum number of file descriptors allowed per child process.
69
if [ "x$ULIMIT_MAX_FILES" != "x" ] ; then
74
if [ "x$ARGV" = "x" ] ; then
79
start|stop|restart|graceful|graceful-stop)
83
startssl|sslstart|start-SSL)
84
echo The startssl option is no longer supported.
85
echo Please edit httpd.conf to include the SSL configuration settings
86
echo and then use "apachectl start".
94
$LYNX $STATUSURL | awk ' /process$/ { print; exit } { print } '