summaryrefslogtreecommitdiff
blob: c1310bec1bfcaeb25029fd2ef719e111653128cf (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
#!/sbin/openrc-run
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License, v2 or
# later
# $Id$

DAEMON=/usr/sbin/bitlbee
PIDFILE=/var/run/bitlbee/bitlbee.pid

depend() {
	need logger net
}

start () {
	ebegin "Starting bitlbee"
	checkpath -d -m 0755 -o bitlbee:bitlbee `dirname ${PIDFILE}`
	start-stop-daemon --start --quiet \
		-u bitlbee:bitlbee  --exec ${DAEMON} -- -P ${PIDFILE} \
		${BITLBEE_OPTS}
	eend $?
}

stop() {
	ebegin "Stopping bitlbee"
	start-stop-daemon --stop --quiet --pidfile ${PIDFILE}
	eend $?
}