Skip to content

Instantly share code, notes, and snippets.

@truongvan
Last active October 7, 2022 03:14
Show Gist options
  • Save truongvan/10f4f10405cf7c371b71401f1416fbd9 to your computer and use it in GitHub Desktop.
Save truongvan/10f4f10405cf7c371b71401f1416fbd9 to your computer and use it in GitHub Desktop.
restart wifi raspberry pi
ping -c4 192.168.1.1 > /dev/null
if [ $? != 0 ]
then
sudo ifconfig wlan0 down
sleep 5
sudo ifconfig wlan0 up
fi
*/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