Skip to content

Instantly share code, notes, and snippets.

@jasom
Created August 25, 2014 18:58
Show Gist options
  • Save jasom/c467d1c49e9f5841742c to your computer and use it in GitHub Desktop.
Save jasom/c467d1c49e9f5841742c to your computer and use it in GitHub Desktop.
#!/sbin/runscript
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License, v2 or
# later
# $Header: /var/cvsroot/gentoo-x86/net-im/bitlbee/files/bitlbee.initd,v 1.4 2013/01/08 14:25:21 cedk Exp $
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} --pidfile ${PIDFILE} \
-- -P ${PIDFILE} ${BITLBEE_OPTS}
eend $?
}
stop() {
ebegin "Stopping bitlbee"
start-stop-daemon --stop --quiet --pidfile ${PIDFILE}
eend $?
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment