#!/sbin/runscript # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header$ start() { ebegin "Starting DVBd" start-stop-daemon --quiet --start -c ${USER}:${GROUP} \ --pidfile ${PIDFILE} --exec /usr/sbin/dvbd \ --nicelevel ${NICE} -- \ &>${LOG} & result=$? sleep 2 [ -z "`pgrep -u ${USER} dvbd`" ] && result=1 if [ $result -eq 1 ]; then eerror "Failed to start DVBd. Check ${LOG} for more information" fi; eend $result } stop() { ebegin "Stopping DVBd - please wait" start-stop-daemon --stop --quiet --pidfile ${PIDFILE} eend $? } restart() { svc_stop sleep 10 svc_start }