net-im/xib-bot/files/xib-bot.initd
author Da Risk <da_risk@geekorum.com>
Tue, 16 Apr 2013 10:27:59 +0200
changeset 85 487a92c4ece8
parent 1 af44598ccbe3
child 117 0cb2ee2d7365
permissions -rwxr-xr-x
Add RbCommitHook a mercurial hook for reviewboard (Portage version: 2.1.11.60/hg/Linux x86_64, unsigned Manifest commit)

#!/sbin/runscript
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

PIDFILE=${PIDFILE:=/var/run/xib-bot.pid}
CONF=${CONF:=/usr/share/xib-bot/config.xml}
LOGFILE=${LOGFILE:=/var/log/xib-bot.log}

depend() {
	need net
}

start() {
	ebegin "Starting ${SVCNAME}"
	start-stop-daemon --start --exec /usr/share/xib-bot/start_bots_from_xml_config.py \
		-1 ${LOGFILE} -2 ${LOGFILE} \
		-m --pidfile "${PIDFILE}" -b -- "${CONF}"
	eend $?
}

stop() {
	ebegin "Stopping ${SVCNAME}"
	start-stop-daemon --stop --exec /usr/share/xib-bot/start_bots_from_xml_config.py \
		--pidfile "${PIDFILE}"
}