Automatically reconnect wireless connection - Ask Ubuntu

PHOTO EMBED

Thu Aug 20 2020 23:26:44 GMT+0000 (Coordinated Universal Time)

Saved by @mzeid #bsh

#!/bin/bash    
wlan=`/sbin/ifconfig wlan0 | grep inet\ addr | wc -l`    
if [ $wlan -eq 0 ]; then    
    /sbin/ifdown wlan0 && /sbin/ifup wlan0
else    
    echo interface is up    
fi


# Then chmod 555 /root/checkwanup and add it to your crontab:

crontab -e
*/15 * * * * /bin/bash /root/checkwanup
content_copyCOPY

https://askubuntu.com/questions/4037/automatically-reconnect-wireless-connection