Created
August 26, 2015 02:00
-
-
Save andykais/ef1e53c5ad716878abd3 to your computer and use it in GitHub Desktop.
check every hour if my dns manager has allowed github pages redirect, send a text message if it has
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 | |
#one hour (in seconds) | |
wait=$((60 * 60)) | |
while true | |
do | |
dns=$(dig andykais.com +nostats +nocomments +nocmd) | |
if [[ $dns == *"github"* ]] | |
then | |
#if dns response contains github then send a text message | |
echo "DNS control has changed!" | mail -s "andykais.com" [email protected] | |
fi | |
sleep $wait | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment