]> git.pld-linux.org Git - packages/boa.git/blob - boa.init
- cleaning
[packages/boa.git] / boa.init
1 #!/bin/sh
2 #
3 # boa           Boa Web Server
4 #
5 # chkconfig:    345 85 15
6 # description:  Boa is a World Wide Web server.  It is used to serve \
7 #               HTML files and CGI.
8 # processname:  boa
9 # config:       /etc/httpd/boa.conf
10
11
12 # Source function library
13 . /etc/rc.d/init.d/functions
14
15 # Get network config
16 . /etc/sysconfig/network
17
18 # Get service config - may override defaults
19 [ -f /etc/sysconfig/boa ] && . /etc/sysconfig/boa
20
21 # Check that networking is up.
22 if is_yes "${NETWORKING}"; then
23         if [ ! -f /var/lock/subsys/network ]; then
24                 msg_network_down "Boa httpd"
25                 exit 1
26         fi
27 else
28         exit 0
29 fi
30
31
32 # See how we were called.
33 case "$1" in
34   start)
35         # Check if the service is already running?
36         if [ ! -f /var/lock/subsys/boa ]; then
37                 msg_starting "Boa httpd"
38                 daemon boa
39                 RETVAL=$?
40                 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/boa
41         else
42                 msg_already_running "Boa httpd"
43                 exit 1
44         fi
45         ;;
46   stop)
47         # Stop daemons.
48         if [ -f /var/lock/subsys/boa ]; then
49                 msg_stopping "Boa httpd"
50                 killproc boa
51                 rm -f /var/lock/subsys/boa >/dev/null 2>&1
52         else
53                 msg_not_running "Boa httpd"
54                 exit 1
55         fi      
56         ;;
57   restart)
58         $0 stop
59         $0 start
60         ;;
61   reload)
62         if [ -f /var/lock/subsys/boa ]; then
63                 msg_show "Boa httpd"
64                 msg_reload
65                 busy
66                 killproc boa -HUP
67                 deltext
68                 ok              
69         else
70                 msg_not_running "Boa httpd"
71                 exit 1
72         fi
73         ;;
74   force-reload)
75         $0 reload
76         exit $?
77         ;;
78   status)
79         status boa
80         exit $?
81         ;;
82   *)
83         msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
84         exit 1
85 esac
86
87 exit $RETVAL
This page took 0.032541 seconds and 4 git commands to generate.