Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- date
- # wait for first response of router or some other host,
- # waiting for a maximum of 10 seconds for that reply
- ping -c 1 -w 10 192.168.1.1
- # with default interval (1 second), this program should send up to 10 ping packets
- sudo touch /var/log/networkwatchdog.log
- sudo chown USER:USER /var/log/networkwatchdog.log
- */30 * * * * /path/to/script/networkwatchdog.sh &> /var/log/networkwatchdog.log
Add Comment
Please, Sign In to add comment