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