Ubuntu 8.10 Hardy Connectivity Check, Internet Connection test and repair.
I am not sure why but my ubuntu at home keeps losing the connection and I have to manualy disable and enable Network Manager.
So I wrote this:
-> Each 10 minutes test the connections by calling the script
crontab -e
*/10 * * * * bash /home/<userx>/testnet.sh
-> Save changes (CTRL-X, Y)
# cd /home/<userx>
# vim testnet.sh
-> copy and paste this:
#!/bin/bash
#Script to test internet connection and restart Network Manager if it fails.
ping -c 2 -w 3 google.com || /etc/init.d/NetworkManager restart
chmod +x  testnet.sh
ref.
NetworkManager

Tags: , , , , , , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *