Guest User

Untitled

a guest
Jan 23rd, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #!/bin/bash
  2. date
  3. # wait for first response of router or some other host,
  4. # waiting for a maximum of 10 seconds for that reply
  5. ping -c 1 -w 10 192.168.1.1
  6. # with default interval (1 second), this program should send up to 10 ping packets
  7.  
  8. sudo touch /var/log/networkwatchdog.log
  9. sudo chown USER:USER /var/log/networkwatchdog.log
  10.  
  11. */30 * * * * /path/to/script/networkwatchdog.sh &> /var/log/networkwatchdog.log
Add Comment
Please, Sign In to add comment