]> git.pld-linux.org Git - packages/apache.git/commitdiff
Standarized all rc scripts.
authorkloczek <kloczek@pld-linux.org>
Sun, 18 Jul 1999 02:03:49 +0000 (02:03 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    apache.init -> 1.3

apache.init

index 4702c3f26f7f00934119d170248e2907d1f9f321..9cf9e6f592bc488d9812018c2dc46d0c6fc6c95f 100644 (file)
@@ -1,31 +1,40 @@
 #!/bin/sh
 #
-# Startup script for the Apache Web Server
+# apache       Apache Web Server
 #
-# chkconfig: 345 85 15
-# description: Apache is a World Wide Web server.  It is used to serve \
-# HTML files and CGI.
-# processname: httpd
-# pidfile: /var/run/httpd.pid
-# config: /etc/httpd/conf/access.conf
-# config: /etc/httpd/conf/httpd.conf
-# config: /etc/httpd/conf/srm.conf
-
-# Source function library.
+# chkconfig:   345 85 15
+# description: Apache is a World Wide Web server.  It is used to serve \
+#              HTML files and CGI.
+# processname: httpd
+# pidfile:     /var/run/httpd.pid
+# config:      /etc/httpd/conf/access.conf
+# config:      /etc/httpd/conf/httpd.conf
+# config:      /etc/httpd/conf/srm.conf
+
+
+# Source function library
 . /etc/rc.d/init.d/functions
 
+# Get network config
+. /etc/sysconfig/network
+
+# Get service config
+[ -f /etc/sysconfig/apache ] && . /etc/sysconfig/apache
+
 # Check that networking is up.
-[ "${NETWORKING}" = "no" ] && exit0
+[ "${NETWORKING}" = "no" ] && echo "Error: Networking is down"; exit 0
+
 
-# Try set service nice level
-if [ -f /etc/sysconfig/apache ]; then
-    . /etc/sysconfig/apache
-fi    
 # See how we were called.
 case "$1" in
   start)
-       show Starting httpd
-       daemon httpd 
+       # Check if the service is already running?
+       if [ ! -f /var/lock/subsys/httpd ]; then
+               show Starting httpd
+               daemon httpd
+       else
+               echo "httpd already is running"
+       fi
        touch /var/lock/subsys/httpd
        ;;
   stop)
@@ -36,7 +45,7 @@ case "$1" in
   status)
        status httpd
        ;;
-  restart)
+  restart|reload)
        $0 stop
        $0 start
        ;;
This page took 0.048774 seconds and 4 git commands to generate.