Skip to content

Instantly share code, notes, and snippets.

@rjsalts
Created September 12, 2016 12:46
Show Gist options
  • Save rjsalts/90eaa08145cdcd70d267e4b3d45c0fe9 to your computer and use it in GitHub Desktop.
Save rjsalts/90eaa08145cdcd70d267e4b3d45c0fe9 to your computer and use it in GitHub Desktop.
add_host example
#!/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