|
Lines 1-4
Link Here
|
| 1 |
#!/sbin/runscript |
1 |
#!/sbin/openrc-run |
| 2 |
# Copyright 1999-2004 Gentoo Foundation |
2 |
# Copyright 1999-2004 Gentoo Foundation |
| 3 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# Distributed under the terms of the GNU General Public License v2 |
| 4 |
# $Id$ |
4 |
# $Id$ |
|
Lines 6-18
Link Here
|
| 6 |
# NB: Standard config is in /etc/boa/boa.conf |
6 |
# NB: Standard config is in /etc/boa/boa.conf |
| 7 |
# NB: Arguments to pass to boa are in /etc/conf.d/boa |
7 |
# NB: Arguments to pass to boa are in /etc/conf.d/boa |
| 8 |
|
8 |
|
|
|
9 |
command=/usr/sbin/boa |
| 10 |
command_args="${BOA_OPTS}" |
| 11 |
pidfile="/run/boa.pid" |
| 12 |
|
| 9 |
depend() { |
13 |
depend() { |
| 10 |
need net |
14 |
need net |
| 11 |
} |
15 |
} |
| 12 |
|
16 |
|
| 13 |
checkconfig() { |
17 |
start_pre() { |
| 14 |
if [ -e /etc/conf.d/boa ] && [ -n "${BOA_OPTS}" ]; then |
18 |
if [ -e /etc/conf.d/boa ] && [ -n "${BOA_OPTS}" ]; then |
| 15 |
SR=`echo ${BOA_OPTS} | awk '{ FS = " " } { print $2 }'` |
19 |
SR="$(echo ${BOA_OPTS} | awk '{ FS = " " } { print $2 }')" |
| 16 |
else |
20 |
else |
| 17 |
SR=/etc/boa |
21 |
SR=/etc/boa |
| 18 |
fi |
22 |
fi |
|
Lines 23-38
Link Here
|
| 23 |
return 1 |
27 |
return 1 |
| 24 |
fi |
28 |
fi |
| 25 |
} |
29 |
} |
| 26 |
|
|
|
| 27 |
start() { |
| 28 |
checkconfig || return 1 |
| 29 |
ebegin "Starting Boa" |
| 30 |
start-stop-daemon --quiet --start --exec /usr/sbin/boa -- ${BOA_OPTS} |
| 31 |
eend $? |
| 32 |
} |
| 33 |
|
| 34 |
stop() { |
| 35 |
ebegin "Stopping Boa" |
| 36 |
start-stop-daemon --quiet --stop --name boa --exec /usr/sbin/boa |
| 37 |
eend $? |
| 38 |
} |