Created
October 2, 2014 15:12
-
-
Save carsongee/9b5da2442d54a0ff6de6 to your computer and use it in GitHub Desktop.
DNS Resolution Check
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 | |
hostname=example.com | |
while true; do | |
ip=$(dig +short $hostname | tail -n 1) | |
if [ ! -n "$ip" ]; then | |
echo "Failed at $(date)" | |
fi | |
sleep 1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment