Magellan Linux

Annotation of /trunk/apache2/apache2.rc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 284 - (hide annotations) (download)
Tue Jul 31 19:18:35 2007 UTC (16 years, 9 months ago) by niro
File size: 1424 byte(s)
-fixed default runlevels

1 niro 231 #!/bin/bash
2 niro 284 # $Header: /root/magellan-cvs/src/apache2/apache2.rc,v 1.3 2007-07-31 19:18:35 niro Exp $
3 niro 231
4     #%rlevels: 3:s 4:s 5:s 0:k 1:k 2:k 6:k
5     #%start: 60
6 niro 284 #%stop: 30
7 niro 231
8     #deps
9     #%needs:
10     #%before:
11     #%after:
12    
13     source /etc/sysconfig/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 niro 233 -d @@ServerRoot@@ -f /etc/apache2/httpd.conf -k start
23 niro 231 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 --retry -TERM/5/-KILL/5 \
32     --exec /usr/sbin/apache2 --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