-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheck-site-up.bash
12 lines (9 loc) · 1.33 KB
/
check-site-up.bash
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash
# Bash snippet to check if a site is up, and if not notify us via Pushover
status=`curl -s -o /dev/null -w "%{http_code}" https://.nl/`
if [[ $status == 200 ]]
then
exit
else
curl -s --form-string "token=" --form-string "user=" --form-string "message=SERVER DOWN: " https://api.pushover.net/1/messages.json
fi