Created
November 8, 2018 17:09
-
-
Save Jlaird/3efa3f8cc91dde5d940a97acdf6cbd67 to your computer and use it in GitHub Desktop.
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 | |
| # Loops over hostzone and gets NS records and updates NameServers to match. | |
| echo $1 | |
| for domain in $(cli53 export $1 |grep NS); do | |
| if [[ $domain =~ 'ns-' ]]; then | |
| ns_list+=($domain) | |
| fi | |
| done | |
| aws route53domains update-domain-nameservers --domain-name $1 --nameservers "[{\"Name\": \"${ns_list[0]}\"}, {\"Name\": \"${ns_list[1]}\"}, {\"Name\": \"${ns_list[2]}\"}, {\"Name\": \"${ns_list[3]}\"}]" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment