3 # apache Apache Web Server
6 # description: Apache is a World Wide Web server. It is used to serve \
9 # pidfile: /var/run/httpd.pid
10 # config: /etc/httpd/conf/access.conf
11 # config: /etc/httpd/conf/httpd.conf
12 # config: /etc/httpd/conf/srm.conf
15 # Source function library
16 . /etc/rc.d/init.d/functions
19 . /etc/sysconfig/network
22 [ -f /etc/sysconfig/apache ] && . /etc/sysconfig/apache
24 # Check that networking is up.
25 if is_yes "${NETWORKING}"; then
26 if [ ! -f /var/lock/subsys/network -a != stop -a != status ]; then
27 # nls "ERROR: Networking is down. %s can't be run." <service>
28 msg_network_down httpd
36 # See how we were called.
39 # Check if the service is already running?
40 if [ ! -f /var/lock/subsys/httpd ]; then
42 daemon httpd $HTTPD_OPTS
44 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/httpd
46 msg_already_running httpd
51 if [ -f /var/lock/subsys/httpd ]; then
54 rm -f /var/lock/subsys/httpd /var/run/httpd.pid /var/run/httpd.loc* >/dev/null 2>&1
70 if [ -f /var/lock/subsys/httpd ]; then
75 msg_not_running httpd >&2
80 msg_usage "$0 {start|stop|restart|reload|force-reload|status}"