updated on Tue Jan 10 04:01:21 UTC 2012
[aur-mirror.git] / hostapd-git / hostapd
blob9c3b9037753d7e554129b4b74face9e73a0b6ce0
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
6 case "$1" in
7 start)
8 stat_busy "Starting hostapd"
9 /usr/bin/hostapd -B -P /var/run/hostapd.pid /etc/hostapd/hostapd.conf &> /dev/null
10 if [ $? -gt 0 ]; then
11 stat_fail
12 else
13 stat_done
14 add_daemon hostapd
17 stop)
18 stat_busy "Stopping hostapd"
19 [ -f /var/run/hostapd.pid ] && kill `cat /var/run/hostapd.pid` &> /dev/null
20 if [ $? -gt 0 ]; then
21 stat_fail
22 else
23 stat_done
24 rm_daemon hostapd
27 restart)
28 $0 stop
29 sleep 1
30 $0 start
33 echo "usage: $0 {start|stop|restart}"
34 esac