Disconnect then connect Wifi Client script on Slate (GL-AR750S-Ext)

Thank you eric it works!

here is my code if some one need it in future (saved under /usr/bin/wifi_rebooter.sh):

#!/bin/ash
SERVER=8.8.8.8

ping -c2 ${SERVER} > /dev/null
if [ $? -ne 0 ]
then
   echo "Offline"
   ifconfig wlan-sta down
   sleep 25
   ifconfig wlan-sta up
else
   echo "Online"
fi

then make it executable:

chmod +x /usr/bin/wifi_rebooter.sh

Now set a cron in http://192.168.8.1/cgi-bin/luci/ under System → Scheduled Tasks i added this line to check every 2min if internet connection exists if not restart wifi client:

*/2 * * * * /usr/bin/wifi_rebooter.sh

Now go to System → Startup and restart cron.

1 Like