updated on Sat Jan 14 00:11:12 UTC 2012
[aur-mirror.git] / airgtkrack-svn / rc_airgtkrack
blobd0f96ecf27b1aa6d7fe2e339062e46e31e5f7c80
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
6 PID=`pidof -o %PPID /usr/bin/airgtkrack`
7 case "$1" in
8 start)
9 stat_busy "Starting airgtkrack-dameon"
10 [ -z "$PID" ] && /usr/bin/airgtkrack --daemon &
11 if [ $? -gt 0 ]; then
12 stat_fail
13 else
14 add_daemon airgtkrack
15 stat_done
18 stop)
19 stat_busy "Stopping airgtkrack-daemon"
20 [ ! -z "$PID" ] && kill $PID &> /dev/null
21 if [ $? -gt 0 ]; then
22 stat_fail
23 else
24 rm_daemon airgtkrack
25 stat_done
28 status)
29 [ ! -z "$PID" ] && exit 1
30 exit 0
32 restart)
33 $0 stop
34 $0 start
37 echo "usage: $0 {start|stop|restart}"
38 esac
39 exit 0