httpd.init revision a2652f3451528565db1f85db6953fc30799d7ead
66bd3b3c6b171271c705b897823dcdcf29464698Michael Graff# Copyright 2003-2006 The Apache Software Foundation or its licensors, as
66bd3b3c6b171271c705b897823dcdcf29464698Michael Graff# Licensed under the Apache License, Version 2.0 (the "License");
66bd3b3c6b171271c705b897823dcdcf29464698Michael Graff# you may not use this file except in compliance with the License.
66bd3b3c6b171271c705b897823dcdcf29464698Michael Graff# You may obtain a copy of the License at
66bd3b3c6b171271c705b897823dcdcf29464698Michael Graff# Unless required by applicable law or agreed to in writing, software
66bd3b3c6b171271c705b897823dcdcf29464698Michael Graff# distributed under the License is distributed on an "AS IS" BASIS,
66bd3b3c6b171271c705b897823dcdcf29464698Michael Graff# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
66bd3b3c6b171271c705b897823dcdcf29464698Michael Graff# See the License for the specific language governing permissions and
66bd3b3c6b171271c705b897823dcdcf29464698Michael Graff# limitations under the License.
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff# Startup script for the Apache Web Server
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff# chkconfig: - 85 15
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael Graff# description: Apache is a World Wide Web server. It is used to serve \
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff# HTML files and CGI.
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff# processname: httpd
66bd3b3c6b171271c705b897823dcdcf29464698Michael Graff# Source function library.
f181f94ec8da8b1dbcc6353e8be965ea4a5ea282Michael Graff# This will prevent initlog from swallowing up a pass-phrase prompt if
31fab17bcdbe302592a6c0dc5374ef56333ee879Michael Graff# mod_ssl needs a pass-phrase from the user.
f181f94ec8da8b1dbcc6353e8be965ea4a5ea282Michael Graff# Set HTTPD=/usr/sbin/httpd.worker in /etc/sysconfig/httpd to use a server
3ac63b472022ff92691d1fe69ac715a729671965Michael Graff# with the thread-based "worker" MPM; BE WARNED that some modules may not
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff# work correctly with a thread-based MPM; notably PHP will refuse to start.
29f28fe573d4b3b318b3b026d567c1eb86738015Michael Graff# Path to the apachectl script, server binary, and short-form for messages.
11efdeb076d65fa9f0c5fc067dc040e7c99dfba6Michael Graff# check for 1.3 configuration
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff GONE="(ServerType|BindAddress|Port|AddModule|ClearModuleList|"
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff GONE="${GONE}AgentLog|RefererLog|RefererIgnore|FancyIndexing|"
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff if grep -Eiq "^[[:space:]]*($GONE)" $CONFFILE; then
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael Graff echo 1>&2 " Apache 1.3 configuration directives found"
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael Graff echo 1>&2 " please read @docdir@/migration.html"
31fab17bcdbe302592a6c0dc5374ef56333ee879Michael Graff# The semantics of these two functions differ from the way apachectl does
31fab17bcdbe302592a6c0dc5374ef56333ee879Michael Graff# things -- attempting to start while running is a failure, and shutdown
31fab17bcdbe302592a6c0dc5374ef56333ee879Michael Graff# when not running is also a failure. So we just do it the way init scripts
31fab17bcdbe302592a6c0dc5374ef56333ee879Michael Graff# are expected to behave here.
ebdd11e84734e28ddd64562e82a7c646a58a04f4Michael Graff [ $RETVAL = 0 ] && touch /var/lock/subsys/httpd
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff [ $RETVAL = 0 ] && rm -f /var/lock/subsys/httpd /var/run/httpd.pid
66bd3b3c6b171271c705b897823dcdcf29464698Michael Graff# See how we were called.
213973a334f92d4aef4ef62b4538fc2e4d0e8082Michael Graff echo $"Usage: $prog {start|stop|restart|condrestart|reload|status|fullstatus|graceful|help|configtest}"