mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-06-15 10:42:48 +00:00
Fix dns_pdns.sh to use saved account conf
This commit is contained in:
parent
2ebecf1aa0
commit
1aabb7d6de
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env sh
|
||||
#!/usr/bin/bash
|
||||
# shellcheck disable=SC2034
|
||||
dns_pdns_info='PowerDNS Server API
|
||||
Site: PowerDNS.com
|
||||
@ -10,6 +10,7 @@ Options:
|
||||
PDNS_Ttl=60 Domain TTL. Default: "60".
|
||||
'
|
||||
|
||||
|
||||
DEFAULT_PDNS_TTL=60
|
||||
|
||||
######## Public functions #####################
|
||||
@ -20,6 +21,11 @@ dns_pdns_add() {
|
||||
fulldomain=$1
|
||||
txtvalue=$2
|
||||
|
||||
PDNS_Url="${PDNS_Url:-$(_readaccountconf_mutable PDNS_Url)}"
|
||||
PDNS_ServerId="${PDNS_ServerId:-$(_readaccountconf_mutable PDNS_ServerId)}"
|
||||
PDNS_Token="${PDNS_Token:-$(_readaccountconf_mutable PDNS_Token)}"
|
||||
PDNS_Ttl="${PDNS_Ttl:-$(_readaccountconf_mutable PDNS_Ttl)}"
|
||||
|
||||
if [ -z "$PDNS_Url" ]; then
|
||||
PDNS_Url=""
|
||||
_err "You don't specify PowerDNS address."
|
||||
@ -73,6 +79,11 @@ dns_pdns_rm() {
|
||||
fulldomain=$1
|
||||
txtvalue=$2
|
||||
|
||||
PDNS_Url="${PDNS_Url:-$(_readaccountconf_mutable PDNS_Url)}"
|
||||
PDNS_ServerId="${PDNS_ServerId:-$(_readaccountconf_mutable PDNS_ServerId)}"
|
||||
PDNS_Token="${PDNS_Token:-$(_readaccountconf_mutable PDNS_Token)}"
|
||||
PDNS_Ttl="${PDNS_Ttl:-$(_readaccountconf_mutable PDNS_Ttl)}"
|
||||
|
||||
if [ -z "$PDNS_Ttl" ]; then
|
||||
PDNS_Ttl="$DEFAULT_PDNS_TTL"
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user