From 5f744308273bd89c124b9a032a4790931b7778f6 Mon Sep 17 00:00:00 2001 From: alexandergott-afk Date: Thu, 12 Feb 2026 15:12:18 +0100 Subject: [PATCH] Allow more than one DNS server for HA environments --- dnsapi/dns_nsupdate.sh | 88 +++++++++++++++++++++++++----------------- 1 file changed, 52 insertions(+), 36 deletions(-) diff --git a/dnsapi/dns_nsupdate.sh b/dnsapi/dns_nsupdate.sh index 9b14553b78..d3c7b53064 100755 --- a/dnsapi/dns_nsupdate.sh +++ b/dnsapi/dns_nsupdate.sh @@ -34,42 +34,49 @@ dns_nsupdate_add() { [ -n "${NSUPDATE_KEY}" ] || NSUPDATE_KEY="" [ -n "${NSUPDATE_OPT}" ] || NSUPDATE_OPT="" + IFS=',' read -r -a NSUPDATE_SERVERS <<< "$NSUPDATE_SERVER" + _info "adding ${fulldomain}. 60 in txt \"${txtvalue}\"" [ -n "$DEBUG" ] && [ "$DEBUG" -ge "$DEBUG_LEVEL_1" ] && nsdebug="-d" [ -n "$DEBUG" ] && [ "$DEBUG" -ge "$DEBUG_LEVEL_2" ] && nsdebug="-D" - if [ -z "${NSUPDATE_ZONE}" ]; then - #shellcheck disable=SC2086 - if [ -z "${NSUPDATE_KEY}" ]; then - nsupdate $nsdebug $NSUPDATE_OPT <