Last active
December 13, 2016 14:09
-
-
Save RShergold/652b640e7346e3157c6592b15c3facb4 to your computer and use it in GitHub Desktop.
ping until website returns 200
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
until [ $STATUS = "200" ]; do | |
STATUS=`curl -sL -w "%{http_code}\\n" "https://www.example.com/" -o /dev/null` | |
echo $STATUS | |
sleep 5 | |
done | |
echo "Website back up" | |
osascript -e 'display notification "Website back up" with title "isup"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment