Browse Source

Dockerfile updated to install bind-tools (nsupdate). Added the possibility to specify a zone through NSUPDATE_ZONE variables when using dns_nsupdate.sh

pull/1808/head
Marco Spinosa 7 years ago
parent
commit
45344f32cf
  1. 4
      dnsapi/dns_nsupdate.sh

4
dnsapi/dns_nsupdate.sh

@ -27,7 +27,7 @@ dns_nsupdate_add() {
fi fi
$ECHO "update add ${fulldomain}. 60 in txt \"${txtvalue}\"" >>${NSUPDATE_COMMANDS_FILE} $ECHO "update add ${fulldomain}. 60 in txt \"${txtvalue}\"" >>${NSUPDATE_COMMANDS_FILE}
$ECHO "send" >>${NSUPDATE_COMMANDS_FILE} $ECHO "send" >>${NSUPDATE_COMMANDS_FILE}
_debug "$(cat ${NSUPDATE_COMMANDS_FILE})" _debug "$(cat ${NSUPDATE_COMMANDS_FILE})"
if ! $NSUPDATE -k "${NSUPDATE_KEY}" -v ${NSUPDATE_COMMANDS_FILE}; then if ! $NSUPDATE -k "${NSUPDATE_KEY}" -v ${NSUPDATE_COMMANDS_FILE}; then
@ -46,7 +46,7 @@ dns_nsupdate_rm() {
[ -n "${NSUPDATE_SERVER}" ] || NSUPDATE_SERVER="localhost" [ -n "${NSUPDATE_SERVER}" ] || NSUPDATE_SERVER="localhost"
[ -n "${NSUPDATE_SERVER_PORT}" ] || NSUPDATE_SERVER_PORT=53 [ -n "${NSUPDATE_SERVER_PORT}" ] || NSUPDATE_SERVER_PORT=53
_info "removing ${fulldomain}. txt" _info "removing ${fulldomain}. txt"
$ECHO "server ${NSUPDATE_SERVER} ${NSUPDATE_SERVER_PORT}" >${NSUPDATE_COMMANDS_FILE} $ECHO "server ${NSUPDATE_SERVER} ${NSUPDATE_SERVER_PORT}" >${NSUPDATE_COMMANDS_FILE}
if ! [ -z "$NSUPDATE_ZONE" ]; then if ! [ -z "$NSUPDATE_ZONE" ]; then
$ECHO "zone ${NSUPDATE_ZONE}" >>${NSUPDATE_COMMANDS_FILE} $ECHO "zone ${NSUPDATE_ZONE}" >>${NSUPDATE_COMMANDS_FILE}

Loading…
Cancel
Save