updated on Mon Jan 16 12:07:49 UTC 2012
[aur-mirror.git] / mystar / mystar.rc
bloba1391b997e06ee86d0d5e7d1bde370ebaf7aa40e
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
6 pid=$(pidof -o %PPID /usr/bin/mystar)
8 case "$1" in
9 start)
10 stat_busy "Starting Mystar Supplicant"
11 [ -z "$pid" ] && /usr/bin/mystar >/dev/null 2>&1 &
12 sleep 1
13 if [ $? -gt 0 ]; then
14 stat_fail
15 else
16 add_daemon mystar
17 stat_done
20 stop)
21 stat_busy "Stopping Mystar Supplicant"
22 [ ! -z "$pid" ] && kill -9 $pid >/dev/null 2>&1
23 if [ $? -gt 0 ]; then
24 stat_fail
25 else
26 rm_daemon mystar
27 stat_done
30 restart)
31 $0 stop
32 $0 start
35 echo "usage: $0 {start|stop|restart}"
36 esac
38 exit 0