updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / halevt / halevt.rc
blob5de7d14072018bd1304be300a5b49978415de72f
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
6 PID=`pidof -o %PPID /usr/bin/halevt`
8 case "$1" in
10 start)
11 stat_busy "Starting halevt"
12 [ -z "$PID" ] && /usr/bin/halevt
13 if [ $? -gt 0 ]; then
14 stat_fail
15 else
16 add_daemon halevt
17 stat_done
21 stop)
22 stat_busy "Stopping halevt"
23 [ ! -z "$PID" ] && kill $PID &> /dev/null
24 if [ $? -gt 0 ]; then
25 stat_fail
26 else
27 rm_daemon halevt
28 stat_done
32 restart)
33 $0 stop
34 $0 start
38 echo "usage: $0 {start|stop|restart}"
39 esac
40 exit 0