Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- subject="Server Status Alert"
- from="youremail@gmail.com"
- to="youremail@gmail.com"
- # confirm the website/server is runing
- https=https://yourdomain.duckdns.org
- status=`curl $https -k -s -f -o /dev/null && echo "SUCCESS" || echo "ERROR"`
- if [[ "$status" == ERROR ]]; then
- echo Notice | mail -s "Home Assistant Down" youremail@gmail.com
- fi
- exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement