From 34c8642000060563dcff469964577f81b31ff9b8 Mon Sep 17 00:00:00 2001 From: kloczek Date: Sun, 18 Jul 1999 02:03:49 +0000 Subject: [PATCH] Standarized all rc scripts. Changed files: apache.init -> 1.3 --- apache.init | 47 ++++++++++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 19 deletions(-) diff --git a/apache.init b/apache.init index 4702c3f..9cf9e6f 100644 --- a/apache.init +++ b/apache.init @@ -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 ;; -- 2.44.0