Created
September 5, 2017 15:56
-
-
Save ghazlewood/ad45336095d12a31b790b81b4cb27898 to your computer and use it in GitHub Desktop.
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/sh | |
# | |
# check the bare domain IP against the current CDN hostnames | |
# | |
# edit me! | |
DOMAIN=hiscoxbroker.co.uk | |
# gather details | |
BAREIP=`dig a $DOMAIN +short` | |
CDN=`dig $DOMAIN.cdn.cloudflare.net +short` | |
# compare | |
if [[ $CDN != *$BAREIP* ]]; then | |
echo "boop boop, bare domain not a CDN load balancer IP!" | |
#else | |
# echo "do nothing" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment