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_no "${NETWORKING}"; then
26 # nls "ERROR: Networking is down. %s can't be run." <service>
27 msg_network_down httpd
31 if is_no ${IPV6_NETWORKING}; then
32 HTTPD_OPTS="$HTTPD_OPTS -4"
35 # See how we were called.
38 # Check if the service is already running?
39 if [ ! -f /var/lock/subsys/httpd ]; then
41 daemon httpd $HTTPD_OPTS
43 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/httpd
45 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 msg_usage "$0 {start|stop|restart|status}"