Create script file:
with following content:
if [ -z "$SSID" ]
echo "`date -Is` WiFi interface is down, trying to reconnect" >> /home/volumio/wifi-log.txt
systemctl restart wireless
echo "WiFi check finished"
Make new file executable:
by putting following content at end of file:
Test it by disconnecting from WiFi, script should reestablish connection within 1 minute.
Reconnect RPi and check log file: