Skip to content

Instantly share code, notes, and snippets.

@NghiaMaster
Created October 14, 2019 12:53
Show Gist options
  • Save NghiaMaster/98e19f42a46c42f14a25e5d7b7757bcd to your computer and use it in GitHub Desktop.
Save NghiaMaster/98e19f42a46c42f14a25e5d7b7757bcd to your computer and use it in GitHub Desktop.
Wifi check and auto reconnect
#!/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