From fdb72b25bcad349b84098ae6f7983b4779ff97ff Mon Sep 17 00:00:00 2001 From: Marco Spinosa Date: Tue, 21 Aug 2018 15:41:59 +0200 Subject: [PATCH] Dockerfile updated to install bind-tools (nsupdate). Added the possibility to specify a zone through NSUPDATE_ZONE variables when using dns_nsupdate.sh --- dnsapi/dns_nsupdate.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/dnsapi/dns_nsupdate.sh b/dnsapi/dns_nsupdate.sh index d8086b37..acf03711 100755 --- a/dnsapi/dns_nsupdate.sh +++ b/dnsapi/dns_nsupdate.sh @@ -21,12 +21,12 @@ dns_nsupdate_add() { fi _info "adding ${fulldomain}. 60 in txt \"${txtvalue}\"" - $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 - $ECHO "zone ${NSUPDATE_ZONE}" >> ${NSUPDATE_COMMANDS_FILE} + $ECHO "zone ${NSUPDATE_ZONE}" >>${NSUPDATE_COMMANDS_FILE} fi - $ECHO "update add ${fulldomain}. 60 in txt \"${txtvalue}\"" >> ${NSUPDATE_COMMANDS_FILE} - $ECHO "send" >> ${NSUPDATE_COMMANDS_FILE} + $ECHO "update add ${fulldomain}. 60 in txt \"${txtvalue}\"" >>${NSUPDATE_COMMANDS_FILE} + $ECHO "send" >>${NSUPDATE_COMMANDS_FILE} _debug "$(cat ${NSUPDATE_COMMANDS_FILE})" @@ -47,12 +47,12 @@ dns_nsupdate_rm() { [ -n "${NSUPDATE_SERVER_PORT}" ] || NSUPDATE_SERVER_PORT=53 _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 - $ECHO "zone ${NSUPDATE_ZONE}" >> ${NSUPDATE_COMMANDS_FILE} + $ECHO "zone ${NSUPDATE_ZONE}" >>${NSUPDATE_COMMANDS_FILE} fi - $ECHO "update delete ${fulldomain}. txt" >> ${NSUPDATE_COMMANDS_FILE} - $ECHO "send" >> ${NSUPDATE_COMMANDS_FILE} + $ECHO "update delete ${fulldomain}. txt" >>${NSUPDATE_COMMANDS_FILE} + $ECHO "send" >>${NSUPDATE_COMMANDS_FILE} _debug "$(cat ${NSUPDATE_COMMANDS_FILE})"