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/httpd.conf
13 # Source function library
14 . /etc/rc.d/init.d/functions
17 . /etc/sysconfig/network
20 [ -f /etc/sysconfig/apache ] && . /etc/sysconfig/apache
22 # Check that networking is up.
23 if is_no "${NETWORKING}"; then
24 # nls "ERROR: Networking is down. %s can't be run." <service>
25 msg_network_down httpd
29 if is_no "${IPV6_NETWORKING}"; then
30 HTTPD_OPTS="$HTTPD_OPTS -4"
33 # See how we were called.
36 # Check if the service is already running?
37 if [ ! -f /var/lock/subsys/httpd ]; then
39 daemon httpd $HTTPD_OPTS
41 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/httpd
43 msg_already_running httpd
49 if [ -f /var/lock/subsys/httpd ]; then
52 rm -f /var/lock/subsys/httpd /var/run/httpd.pid /var/run/httpd.loc* >/dev/null 2>&1
68 msg_usage "$0 {start|stop|restart|status}"