diff --git a/dnsapi/dns_knot.sh b/dnsapi/dns_knot.sh index 094a6981..9c9bc0fa 100644 --- a/dnsapi/dns_knot.sh +++ b/dnsapi/dns_knot.sh @@ -8,9 +8,12 @@ dns_knot_add() { txtvalue=$2 _checkKey || return 1 [ -n "${KNOT_SERVER}" ] || KNOT_SERVER="localhost" + KNOT_ZONE="${KNOT_ZONE:-$(_readaccountconf_mutable KNOT_ZONE)}" + # save the dns server and key to the account.conf file. _saveaccountconf KNOT_SERVER "${KNOT_SERVER}" _saveaccountconf KNOT_KEY "${KNOT_KEY}" + _saveaccountconf KNOT_ZONE "${KNOT_ZONE}" if ! _get_root "$fulldomain"; then _err "Domain does not exist." @@ -18,14 +21,23 @@ dns_knot_add() { fi _info "Adding ${fulldomain}. 60 TXT \"${txtvalue}\"" - - knsupdate -y "${KNOT_KEY}" <