7 boot_mesg
-n "Starting hostapd... "
8 mkdir
-p /var
/run
/hostapd
9 # enable wlan module of collectd
10 sed -i -e "s|#LoadPlugin wireless|LoadPlugin wireless|g" /etc
/collectd.conf
11 /usr
/bin
/wlanconfig ath0 destroy
12 /usr
/bin
/wlanconfig blue0 create wlandev wifi0 wlanmode ap
13 /usr
/sbin
/iwconfig blue0 channel
05
14 /usr
/bin
/hostapd
-P /var
/run
/hostapd
/etc
/hostapd.conf
</dev
/tty12
>/dev
/tty12
2>&1 &
19 boot_mesg
"Stopping hostapd..."
20 # Just make sure when going down the first time blue0 nw values are ignored
21 grep -v 'NAME="blue0"' /etc
/udev
/rules.d
/30-persistent-network.rules
> /tmp
/30-persistent-network.rules
22 mv /tmp
/30-persistent-network.rules
/etc
/udev
/rules.d
/30-persistent-network.rules
23 /usr
/bin
/wlanconfig blue0 destroy
24 killproc
/usr
/bin
/hostapd
35 statusproc
/usr
/bin
/hostapd
39 echo "Usage: ${0} {start|stop|restart|status}"