Magellan Linux

Contents of /trunk/apache2/apache2.rc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 863 - (show annotations) (download)
Fri Jul 3 13:49:52 2009 UTC (14 years, 8 months ago) by niro
File size: 1397 byte(s)
-rc config moved to /etc/conf.d

1 #!/bin/bash
2 # $Header: /root/magellan-cvs/src/apache2/apache2.rc,v 1.5 2009-07-03 13:49:52 niro Exp $
3
4 #%rlevels: 3:s 4:s 5:s 0:k 1:k 2:k 6:k
5 #%start: 60
6 #%stop: 30
7
8 #deps
9 #%needs:
10 #%before:
11 #%after:
12
13 source /etc/conf.d/rc
14 source $rc_functions
15
16 case "$1" in
17 start)
18 echo -e ${COLOREDSTAR}"Starting apache2 http daemon ..."
19 [ -f /var/log/apache2/ssl_scache ] && rm /var/log/apache2/ssl_scache
20
21 start-stop-daemon --start --exec /usr/sbin/apache2 -- \
22 -d @@ServerRoot@@ -f /etc/apache2/httpd.conf -k start
23 evaluate_retval
24
25 update_svcstatus $1
26 splash svc_started "$(basename $0)" 0
27 ;;
28
29 stop)
30 echo -e ${COLOREDSTAR}"Stopping apache2 http daemon ..."
31 start-stop-daemon --stop --exec /usr/sbin/apache2 \
32 --pidfile /var/run/apache2.pid
33 evaluate_retval
34
35 update_svcstatus $1
36 splash svc_stopped "$(basename $0)" 0
37 ;;
38
39 reload)
40 echo -e ${COLOREDSTAR}"Reloading apache2 http daemon ..."
41 start-stop-daemon --stop --oknodo --signal HUP \
42 --exec /usr/sbin/apache2 --pidfile /var/run/apache2.pid
43 ;;
44
45 graceful)
46 echo -e ${COLOREDSTAR}"Gracefully restarting apache2 http daemon ..."
47 start-stop-daemon --stop --signal USR1 \
48 --exec /usr/sbin/apache2 --pidfile /var/run/apache2.pid
49 ;;
50
51 restart)
52 $0 stop
53 sleep 1
54 $0 start
55 ;;
56
57 status)
58 statusproc /usr/sbin/apache2
59 ;;
60
61 *)
62 echo "Usage: $0 {start|stop|reload|graceful|restart|status}"
63 exit 1
64 ;;
65 esac