Last active
August 29, 2015 14:23
-
-
Save crazyrohila/43466dcff4d4ec9656c9 to your computer and use it in GitHub Desktop.
Mini Pingdom
This file contains hidden or 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 | |
RESO=`/usr/bin/curl -sI https://www.drupal.org | head -n 1 | awk -F " " '{print $2}'` | |
if [ $RESO -eq 200 ] | |
then | |
echo "All is well!!!" | |
else | |
echo "Hey!!! get to work, immediately" | mail -s "Hey! your site is down; better get to work" [email protected] | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment