Last active
October 7, 2022 03:14
-
-
Save truongvan/10f4f10405cf7c371b71401f1416fbd9 to your computer and use it in GitHub Desktop.
restart wifi raspberry pi
This file contains hidden or 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
| ping -c4 192.168.1.1 > /dev/null | |
| if [ $? != 0 ] | |
| then | |
| sudo ifconfig wlan0 down | |
| sleep 5 | |
| sudo ifconfig wlan0 up | |
| fi |
This file contains hidden or 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
| */5 * * * * /usr/bin/sudo -H /usr/local/bin/checkwifi.sh >> /dev/null 2>&1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment