Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- SERVER=$1
- NOTIFYEMAIL=your.email.here
- while true
- do
- echo "checking $SERVER"
- wget -q "$SERVER" -O /dev/null > /dev/null 2>&1 || mailx -s "Server $SERVER is down" "$NOTIFYEMAIL" < /dev/null
- sleep 60
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement