6 . /lib/functions/procd.sh
8 cd /sys/class/ieee80211
22 procd_open_service hostapd
25 [ -d "$phy" ] || continue
27 mkdir -p /var/run/wpa_supplicant-$phy /var/run/hostapd-$phy
29 if [ -x "/usr/sbin/hostapd" ]; then
30 procd_open_instance hostapd-$phy
31 procd_set_param command /usr/sbin/hostapd -s -n $phy -g /var/run/hostapd-${phy}/global
32 procd_set_param CREATE_TIME="$(date -r $phy)" # force restart on recreated phy
33 procd_set_param respawn
37 if [ -x "/usr/sbin/wpa_supplicant" ]; then
38 procd_open_instance supplicant-$phy
39 procd_set_param command /usr/sbin/wpa_supplicant -s -n $phy -g /var/run/wpa_supplicant-${phy}/global
40 procd_set_param CREATE_TIME="$(date -r $phy)" # force restart on recreated phy
41 procd_set_param respawn
46 procd_close_service set