updated on Thu Jan 19 12:17:07 UTC 2012
[aur-mirror.git] / eee-control / eee-control-daemon.rc
blob7c05fa5c57f94182fa08a2e910c2db45e4c03dd7
1 #! /bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
6 PID=`cat /var/run/eee-control-daemon.pid 2>/dev/null`
7 case "$1" in
8 start)
9 stat_busy "Starting Eee Control Daemon"
10 [ -z "$PID" ] && /usr/bin/eee-control-daemon
11 if [ $? -gt 0 ]; then
12 stat_fail
13 else
14 add_daemon eee-control-daemon
15 stat_done
18 stop)
19 stat_busy "Stopping Eee Control Daemon"
20 [ ! -z "$PID" ] && kill $PID &> /dev/null
21 if [ $? -gt 0 ]; then
22 stat_fail
23 else
24 rm_daemon eee-control-daemon
25 rm -f /var/run/eee-control-daemon.pid
26 stat_done
30 restart)
31 $0 stop
32 sleep 1
33 $0 start
36 echo "usage: $0 {start|stop|restart}"
38 esac
39 exit 0