Created
September 12, 2016 12:46
-
-
Save rjsalts/90eaa08145cdcd70d267e4b3d45c0fe9 to your computer and use it in GitHub Desktop.
add_host example
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/bash | |
set -euo pipefail | |
IFS=$'\n\t' | |
hostname=${1:-} | |
global=${2:-} | |
private=${3:-} | |
ttl=${4:-86400} | |
echo -e "$hostname $ttl IN AAAA $global\nsend" | nsupdate -k /path/to/global.key #add key to match-clients for global view | |
echo -e "$hostname $ttl IN AAAA $private\nsend" | nsupdate -k /path/to/private.key #add key to match-clients for private view |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment