Last active
February 12, 2018 14:04
-
-
Save marc-hanheide/37e6c2a66652a64824e53ccfc1564de2 to your computer and use it in GitHub Desktop.
a cronjob to fix the network using rfkill
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
| #!/bin/bash | |
| ## add this to cron as * * * * * /home/turtlebot/fix-network.sh | |
| if ping -W 5 -c 1 10.82.0.1 > /dev/null; then | |
| true | |
| else | |
| rfkill block wifi | |
| #sleep 1 | |
| #rmmod iwldvm iwlwifi | |
| sleep 5 | |
| #modprobe iwlwifi | |
| #sleep 1 | |
| rfkill unblock wifi | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment