Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- while true; do
- sleep 15
- ping -c1 192.168.1.1 > /dev/null 2>&1
- if [ $? -ge 1 ]; then
- echo "Ping failed. Rebooting now!"
- sudo shutdown -r 1
- while true; do
- sleep 5
- done
- fi
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement