updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / catalyst-utils / atieventsd.sh
blob16bd9a4fa7b5d1437d4be61114a5e23c5a3ccadf
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
6 ATID_PID=`pidof -o %PPID /usr/sbin/atieventsd`
8 case "$1" in
9 start)
10 rc=0
11 stat_busy "Starting ATI Events Daemon"
12 [ -z "$ATID_PID" ] && /usr/sbin/atieventsd
13 rc=$(($rc+$?))
14 if [ $rc -gt 0 ]; then
15 stat_fail
16 else
17 add_daemon atieventsd
18 stat_done
21 stop)
22 rc=0
23 stat_busy "Stopping ATI Events Daemon"
24 kill $ATID_PID &>/dev/null
25 rc=$(($rc+$?))
26 if [ $rc -gt 0 ]; then
27 stat_fail
28 else
29 rm_daemon atieventsd
30 stat_done
33 restart)
34 $0 stop
35 sleep 1
36 $0 start
39 echo "usage: $0 {start|stop|restart}"
40 esac
41 exit 0