diff --git a/check_inet.sh b/check_inet.sh new file mode 100644 index 0000000..3bc0bcd --- /dev/null +++ b/check_inet.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +ping -c4 www.google.com +let a=$? +if [ "$a" != "0" ]; then + /sbin/shutdown -r +1 Connection lost, rebooting... +fi + +# ToDo afterwards +# make executable +# chmod +x check_inet.sh + +# add in crontab +# */30 * * * * /home/yourname/check_inet.sh