I’m using a script which restores a working AP in the absence of the STA connection, this script is called from rc.local so occurs at boot.
The only issue is whilst the power LED remains on, the right hand LED (showing the SSID is broadcast / a connection has been made) does not work.
I imagine this is because this script runs before the LED is activated, would this be resolved by calling the script at a different time during the boot up sequence?
If so, is there a better way to launch this script than calling it from rc.local?
I’ve pasted the script below in case it’s an issue with the script itself. Thanks for any help
#!/bin/sh
AP_DEV=wlan0
while ( true ) ; do
if !( iw dev $AP_DEV info | grep -q ssid ) ; then
logger wifi-watchdog: Wifi in trouble, to the rescue…
ifconfig $AP_DEV down;
ifconfig $AP_DEV up;
fi
sleep 5
done