summaryrefslogtreecommitdiff
path: root/install/centos/3/httpd-init
blob: dca95cfdd2dffde8a9865341d6f644c90bbb4190 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/bash
#
# Startup script for the Apache Web Server
#
# chkconfig: - 85 15
# description: Apache is a World Wide Web server.  It is used to serve \
#              HTML files and CGI.
# processname: httpd
# Source function library.

# Path to the apachectl script, server binary, and short-form for messages.
apachectl=/usr/local/apache/bin/apachectl
prog=httpd
RETVAL=0

start() {
        echo -n $"Starting $prog: "
        $apachectl startssl
        RETVAL=$?
}
stop() {
        echo -n $"Stopping $prog: "
        $apachectl stop
        RETVAL=$?
}

# See how we were called.
case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  restart)
        stop
        sleep 3
        start
        ;;
  graceful|help|configtest)
        $apachectl $@
        RETVAL=$?
        ;;
  *)
        echo $"Usage: $prog {start|stop|restart|graceful|help|configtest}"
        exit 1
esac

exit $RETVAL