Created
October 21, 2016 05:06
-
-
Save jsonmaur/f1b19c0adcd9c1c8ddf282b4604bf699 to your computer and use it in GitHub Desktop.
cli53 round robin
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
HOST_NAME="speed" | |
TTL="300" | |
CURRENT_IPS=($(cli53 export -f "cdn.test.com" | grep "speed.cdn.test.com" | awk '{print $5}')); | |
for i in "${CURRENT_IPS[@]}"; do if [ $i != $PUBLIC_IP ]; then echo $i && IPCMD+=("$HOST_NAME $TTL A $i"); fi done | |
/usr/local/bin/cli53 rrcreate --replace "cdn.test.com" "${IPCMD[@]}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment