blob: 9be4dba4d0573bd48d5fe6e3499078fd140677f1 (
plain) (
blame)
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
|
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: bitlbee
# REQUIRE: DAEMON
# KEYWORD: shutdown
# Add the following lines to /etc/rc.conf to enable bitlbee:
# bitlbee_enable="YES"
# bitlbee_flags="<set as needed>"
. /etc/rc.subr
name="bitlbee"
rcvar=`set_rcvar`
load_rc_config $name
: ${bitlbee_enable="NO"}
: ${bitlbee_user="%%BITLBEEUSER%%"}
: ${bitlbee_config="%%PREFIX%%/etc/bitlbee/bitlbee.conf"}
required_files="${bitlbee_config}"
command="%%PREFIX%%/sbin/bitlbee"
start_cmd="bitlbee_start"
bitlbee_start()
{
echo "Starting ${name}."
su -m ${bitlbee_user} -c "${command} -D -c ${bitlbee_config} ${bitlbee_flags}"
}
run_rc_command "$1"
|