summaryrefslogtreecommitdiff
blob: d9f114367f04d8dd65673918df47ca4e0c26a8c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-www/boa/files/boa.rc6,v 1.5 2004/04/23 09:02:21 stuart Exp $

# NB: Standard config is in /etc/boa/boa.conf
# NB: Arguments to pass to boa are in /etc/conf.d/boa

depend() {
	need net
}

checkconfig() {
	if [ -e /etc/conf.d/boa ]; then
		SR=`echo ${BOA_OPTS} | awk '{ FS = " " } { print $2 }'`
	else
		SR=/etc/boa
	fi

	if [ ! -e ${SR}/boa.conf ] ; then
		eerror "You need a ${SR}/boa.conf to run Boa"
		eerror "There is a sample file in /usr/share/docs/boa"
		return 1
	fi
}

start() {
	checkconfig || return 1
	ebegin "Starting Boa"
	start-stop-daemon --quiet --start --exec /usr/sbin/boa -- ${BOA_OPTS}
	eend $?
}

stop() {
	ebegin "Stopping Boa"
	start-stop-daemon --quiet --stop --name boa --exec /usr/sbin/boa
	eend $?
}