Skip to content

Instantly share code, notes, and snippets.

@marc-hanheide
Last active February 12, 2018 14:04
Show Gist options
  • Select an option

  • Save marc-hanheide/37e6c2a66652a64824e53ccfc1564de2 to your computer and use it in GitHub Desktop.

Select an option

Save marc-hanheide/37e6c2a66652a64824e53ccfc1564de2 to your computer and use it in GitHub Desktop.
a cronjob to fix the network using rfkill
#!/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