]> git.pld-linux.org Git - packages/apache.git/blame - apache.init
fixed typo in apache.init
[packages/apache.git] / apache.init
CommitLineData
8faab90e 1#!/bin/sh
58f9559b 2#
34c86420 3# apache Apache Web Server
58f9559b 4#
34c86420 5# chkconfig: 345 85 15
6# description: Apache is a World Wide Web server. It is used to serve \
7# HTML files and CGI.
8# processname: httpd
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
13
14
15# Source function library
58f9559b
AF
16. /etc/rc.d/init.d/functions
17
34c86420 18# Get network config
19. /etc/sysconfig/network
20
21# Get service config
22[ -f /etc/sysconfig/apache ] && . /etc/sysconfig/apache
23
58f9559b 24# Check that networking is up.
912b10b6 25[ "${NETWORKING}" = "no" ] && echo "Error: Networking is down" && exit 0
34c86420 26
58f9559b
AF
27
28# See how we were called.
29case "$1" in
30 start)
34c86420 31 # Check if the service is already running?
32 if [ ! -f /var/lock/subsys/httpd ]; then
33 show Starting httpd
34 daemon httpd
35 else
36 echo "httpd already is running"
37 fi
58f9559b
AF
38 touch /var/lock/subsys/httpd
39 ;;
40 stop)
41 show Shutting down httpd
42 killproc httpd
8faab90e 43 rm -f /var/lock/subsys/httpd /var/run/httpd.pid /var/run/httpd.loc*
58f9559b
AF
44 ;;
45 status)
46 status httpd
47 ;;
34c86420 48 restart|reload)
58f9559b
AF
49 $0 stop
50 $0 start
51 ;;
52 *)
53 echo "Usage: $0 {start|stop|restart|status}"
54 exit 1
55 ;;
56esac
57
58exit 0
This page took 0.098568 seconds and 4 git commands to generate.