net-im/xib-bot/files/xib-bot.initd
author Da Risk <da_risk@geekorum.com>
Wed, 05 Feb 2014 10:13:45 +0100
changeset 123 3f182e321c7c
parent 117 0cb2ee2d7365
permissions -rwxr-xr-x
Bump dev-java/icedtea-7.2.4.5 (Portage version: 2.2.8-r1/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:=/etc/xib-bot/config.xml}
LOGFILE=${LOGFILE:=/var/log/xib-bot.log}
STARTFILE={STARTFILE:=/usr/lib/python2.7/site-package/xib-bot/start_bots_from_xml_config.py}

depend() {
	need net
}

start() {
	ebegin "Starting ${SVCNAME}"
	start-stop-daemon --start --exec "$STARTFILE" \
		-1 ${LOGFILE} -2 ${LOGFILE} \
		-m --pidfile "${PIDFILE}" -b -- "${CONF}"
	eend $?
}

stop() {
	ebegin "Stopping ${SVCNAME}"
	start-stop-daemon --stop --exec  "$STARTFILE" \
		--pidfile "${PIDFILE}"
}