mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2026-10-21 13:31:18 +00:00
dns_dynu: use mutable conf storage so newly exported credentials win
Same stale-account.conf override as dns_dnsimple: the sourced plain copy shadowed newly exported Dynu_ClientId/Dynu_Secret. https://github.com/acmesh-official/acme.sh/issues/3216
This commit is contained in:
1 parent
a6766d4186
commit
3fddea2962
1 file changed
+8
-4
+8
-4
@@ -23,6 +23,8 @@ dns_dynu_add() {
|
|||||||
fulldomain=$1
|
fulldomain=$1
|
||||||
txtvalue=$2
|
txtvalue=$2
|
||||||
|
|
||||||
|
Dynu_ClientId="${Dynu_ClientId:-$(_readaccountconf_mutable Dynu_ClientId)}"
|
||||||
|
Dynu_Secret="${Dynu_Secret:-$(_readaccountconf_mutable Dynu_Secret)}"
|
||||||
if [ -z "$Dynu_ClientId" ] || [ -z "$Dynu_Secret" ]; then
|
if [ -z "$Dynu_ClientId" ] || [ -z "$Dynu_Secret" ]; then
|
||||||
Dynu_ClientId=""
|
Dynu_ClientId=""
|
||||||
Dynu_Secret=""
|
Dynu_Secret=""
|
||||||
@@ -32,8 +34,8 @@ dns_dynu_add() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
#save the client id and secret to the account conf file.
|
#save the client id and secret to the account conf file.
|
||||||
_saveaccountconf Dynu_ClientId "$Dynu_ClientId"
|
_saveaccountconf_mutable Dynu_ClientId "$Dynu_ClientId"
|
||||||
_saveaccountconf Dynu_Secret "$Dynu_Secret"
|
_saveaccountconf_mutable Dynu_Secret "$Dynu_Secret"
|
||||||
|
|
||||||
if [ -z "$Dynu_Token" ]; then
|
if [ -z "$Dynu_Token" ]; then
|
||||||
_info "Getting Dynu token."
|
_info "Getting Dynu token."
|
||||||
@@ -69,6 +71,8 @@ dns_dynu_rm() {
|
|||||||
fulldomain=$1
|
fulldomain=$1
|
||||||
txtvalue=$2
|
txtvalue=$2
|
||||||
|
|
||||||
|
Dynu_ClientId="${Dynu_ClientId:-$(_readaccountconf_mutable Dynu_ClientId)}"
|
||||||
|
Dynu_Secret="${Dynu_Secret:-$(_readaccountconf_mutable Dynu_Secret)}"
|
||||||
if [ -z "$Dynu_ClientId" ] || [ -z "$Dynu_Secret" ]; then
|
if [ -z "$Dynu_ClientId" ] || [ -z "$Dynu_Secret" ]; then
|
||||||
Dynu_ClientId=""
|
Dynu_ClientId=""
|
||||||
Dynu_Secret=""
|
Dynu_Secret=""
|
||||||
@@ -78,8 +82,8 @@ dns_dynu_rm() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
#save the client id and secret to the account conf file.
|
#save the client id and secret to the account conf file.
|
||||||
_saveaccountconf Dynu_ClientId "$Dynu_ClientId"
|
_saveaccountconf_mutable Dynu_ClientId "$Dynu_ClientId"
|
||||||
_saveaccountconf Dynu_Secret "$Dynu_Secret"
|
_saveaccountconf_mutable Dynu_Secret "$Dynu_Secret"
|
||||||
|
|
||||||
if [ -z "$Dynu_Token" ]; then
|
if [ -z "$Dynu_Token" ]; then
|
||||||
_info "Getting Dynu token."
|
_info "Getting Dynu token."
|
||||||
|
|||||||