Browse Source
Correct Typo, add -n test
Added a test for non-zero-string, corrected type ZONE instead of OPT
pull/4633/head
gmanic
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
1 deletions
-
dnsapi/dns_nsupdate.sh
|
@ -10,7 +10,7 @@ dns_nsupdate_add() { |
|
|
NSUPDATE_SERVER_PORT="${NSUPDATE_SERVER_PORT:-$(_readaccountconf_mutable NSUPDATE_SERVER_PORT)}" |
|
|
NSUPDATE_SERVER_PORT="${NSUPDATE_SERVER_PORT:-$(_readaccountconf_mutable NSUPDATE_SERVER_PORT)}" |
|
|
NSUPDATE_KEY="${NSUPDATE_KEY:-$(_readaccountconf_mutable NSUPDATE_KEY)}" |
|
|
NSUPDATE_KEY="${NSUPDATE_KEY:-$(_readaccountconf_mutable NSUPDATE_KEY)}" |
|
|
NSUPDATE_ZONE="${NSUPDATE_ZONE:-$(_readaccountconf_mutable NSUPDATE_ZONE)}" |
|
|
NSUPDATE_ZONE="${NSUPDATE_ZONE:-$(_readaccountconf_mutable NSUPDATE_ZONE)}" |
|
|
NSUPDATE_OPT="${NSUPDATE_ZONE:-$(_readaccountconf_mutable NSUPDATE_OPT)}" |
|
|
|
|
|
|
|
|
NSUPDATE_OPT="${NSUPDATE_OPT:-$(_readaccountconf_mutable NSUPDATE_OPT)}" |
|
|
|
|
|
|
|
|
_checkKeyFile || return 1 |
|
|
_checkKeyFile || return 1 |
|
|
|
|
|
|
|
@ -23,6 +23,7 @@ dns_nsupdate_add() { |
|
|
|
|
|
|
|
|
[ -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 |
|
|
|
|
|
[ -n "${NSUPDATE_OPT}" ] || NSUPDATE_OPT="" |
|
|
|
|
|
|
|
|
_info "adding ${fulldomain}. 60 in txt \"${txtvalue}\"" |
|
|
_info "adding ${fulldomain}. 60 in txt \"${txtvalue}\"" |
|
|
[ -n "$DEBUG" ] && [ "$DEBUG" -ge "$DEBUG_LEVEL_1" ] && nsdebug="-d" |
|
|
[ -n "$DEBUG" ] && [ "$DEBUG" -ge "$DEBUG_LEVEL_1" ] && nsdebug="-d" |
|
|