#!/sbin/runscript # $Header: $ # Copyright 2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 PID=/var/run/grenouille.pid CONFIG=/etc/grenouille/user.config : ${LOGFILE:=/dev/null} depend() { need net } checkconfig() { if [ ! -f ${CONFIG} ]; then eerror "Configuration file ${CONFIG} not found" return 1 fi } start() { checkconfig || return 1 ebegin "Starting grenouille" exec start-stop-daemon --quiet --start --make-pidfile --pidfile ${PID} \ --exec /usr/bin/grenouille -- -f ${CONFIG} >> ${LOGFILE} 2>&1 & eend ${?} } stop() { ebegin "Stopping grenouille" start-stop-daemon --stop --pidfile ${PID} eend ${?} }