#!/sbin/runscript # # Copyright (c) 2006, ATI Technologies Inc. All rights reserved. # # Further edits and additions for Gentoo by Armando Di Cianno (c) 2006 DAEMONNAME=atieventsd DAEMONPATH=/opt/ati/sbin DAEMONPIDFILE=/var/run/atieventsd.pid depend() { need acpid use xdm after xdm } start() { if [ -n "`pidof $DAEMONNAME`" ]; then echo "$DAEMONNAME already started" echo "If this is in error, you may have to remove ${DAEMONPIDFILE}" exit -1 fi ebegin "Starting $DAEMONNAME" $DAEMONPATH/$DAEMONNAME $DAEMONOPTS DAEMONPID=`pidof $DAEMONNAME` echo $DAEMONPID > $DAEMONPIDFILE eend $? } stop() { if [ -z "`pidof $DAEMONNAME`" ]; then echo "$DAEMONNAME not running" exit -1 fi ebegin "Stopping $DAEMONNAME" start-stop-daemon --stop --quiet --pidfile $DAEMONPIDFILE eend $? }