Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. #!/bin/bash
  2. SERVER=$1
  3. NOTIFYEMAIL=your.email.here
  4.  
  5. while true
  6. do
  7. echo "checking $SERVER"
  8. wget -q "$SERVER" -O /dev/null > /dev/null 2>&1 || mailx -s "Server $SERVER is down" "$NOTIFYEMAIL" < /dev/null
  9. sleep 60
  10. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement