Created
October 14, 2019 12:53
-
-
Save NghiaMaster/98e19f42a46c42f14a25e5d7b7757bcd to your computer and use it in GitHub Desktop.
Wifi check and auto reconnect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
wlan=`wpa_cli -iwlan0 -p/data/misc/wifi/sockets/ status | grep "ssid=VIETTEL - SLHNB" | wc -l` | |
if [ $wlan -eq 0 ] | |
then | |
wpa_cli -iwlan0 -p/data/misc/wifi/sockets/ reconnect | |
else | |
echo interface is up | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment