]> git.pld-linux.org Git - packages/boa.git/blame_incremental - boa.init
Massive attack. We use -O0 instead -O flags while debug enabled.
[packages/boa.git] / boa.init
... / ...
CommitLineData
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.
22if is_no "${NETWORKING}"; then
23 msg_Network_Down "Boa httpd"
24 exit 1
25fi
26
27
28# See how we were called.
29case "$1" in
30 start)
31 # Check if the service is already running?
32 if [ ! -f /var/lock/subsys/boa ]; then
33 msg_starting "Boa httpd"
34 daemon boa
35 RETVAL=$?
36 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/boa
37 else
38 msg_Already_Running "Boa httpd"
39 exit 1
40 fi
41 ;;
42 stop)
43 # Stop daemons.
44 if [ -f /var/lock/subsys/boa ]; then
45 msg_stopping "Boa httpd"
46 killproc boa
47 rm -f /var/lock/subsys/boa >/dev/null 2>&1
48 else
49 msg_Not_Running "Boa httpd"
50 exit 1
51 fi
52 ;;
53 restart)
54 $0 stop
55 $0 start
56 ;;
57 reload)
58 if [ -f /var/lock/subsys/boa ]; then
59 msg_show "Boa httpd"
60 msg_reload
61 busy
62 killproc boa -HUP
63 deltext
64 ok
65 else
66 msg_Not_Running "Boa httpd"
67 exit 1
68 fi
69 ;;
70 force-reload)
71 $0 reload
72 exit $?
73 ;;
74 status)
75 status boa
76 exit $?
77 ;;
78 *)
79 msg_Usage "$0 {start|stop|status|restart|reload|force-reload}"
80 exit 1
81esac
82
83exit $RETVAL
This page took 0.03239 seconds and 4 git commands to generate.