Browse Source

minor fix pdns api

pull/324/head
neilpang 8 years ago
parent
commit
b9311282eb
  1. 8
      dnsapi/dns_pdns.sh

8
dnsapi/dns_pdns.sh

@ -8,6 +8,8 @@
#PDNS_Token="0123456789ABCDEF"
#PDNS_Ttl=60
DEFAULT_PDNS_TTL=60
######## Public functions #####################
#Usage: add _acme-challenge.www.domain.com "123456789ABCDEF0000000000000000000000000000000000000"
dns_pdns_add() {
@ -33,7 +35,7 @@ dns_pdns_add() {
fi
if [ -z "$PDNS_Ttl" ] ; then
PDNS_Ttl=60
PDNS_Ttl=$DEFAULT_PDNS_TTL
fi
#save the api addr and key to the account conf file.
@ -41,6 +43,10 @@ dns_pdns_add() {
_saveaccountconf PDNS_ServerId "$PDNS_ServerId"
_saveaccountconf PDNS_Token "$PDNS_Token"
if [ "$PDNS_Ttl" != "$DEFAULT_PDNS_TTL" ] ; then
_saveaccountconf PDNS_Ttl "$PDNS_Ttl"
fi
_debug "First detect the root zone"
if ! _get_root $fulldomain ; then
_err "invalid domain"

Loading…
Cancel
Save