without debugging this time :)
[freeside.git] / install / centos / 3 / httpd-init
1 #!/bin/bash
2 #
3 # Startup script for the Apache Web Server
4 #
5 # chkconfig: - 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 # Source function library.
10
11 # Path to the apachectl script, server binary, and short-form for messages.
12 apachectl=/usr/local/apache/bin/apachectl
13 prog=httpd
14 RETVAL=0
15
16 start() {
17         echo -n $"Starting $prog: "
18         $apachectl startssl
19         RETVAL=$?
20 }
21 stop() {
22         echo -n $"Stopping $prog: "
23         $apachectl stop
24         RETVAL=$?
25 }
26
27 # See how we were called.
28 case "$1" in
29   start)
30         start
31         ;;
32   stop)
33         stop
34         ;;
35   restart)
36         stop
37         sleep 3
38         start
39         ;;
40   graceful|help|configtest)
41         $apachectl $@
42         RETVAL=$?
43         ;;
44   *)
45         echo $"Usage: $prog {start|stop|restart|graceful|help|configtest}"
46         exit 1
47 esac
48
49 exit $RETVAL
50