mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2026-08-13 12:33:30 +02: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:
parent
a6766d4186
commit
3fddea2962
1 changed files with 8 additions and 4 deletions
|
|
@ -23,6 +23,8 @@ dns_dynu_add() {
|
|||
fulldomain=$1
|
||||
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
|
||||
Dynu_ClientId=""
|
||||
Dynu_Secret=""
|
||||
|
|
@ -32,8 +34,8 @@ dns_dynu_add() {
|
|||
fi
|
||||
|
||||
#save the client id and secret to the account conf file.
|
||||
_saveaccountconf Dynu_ClientId "$Dynu_ClientId"
|
||||
_saveaccountconf Dynu_Secret "$Dynu_Secret"
|
||||
_saveaccountconf_mutable Dynu_ClientId "$Dynu_ClientId"
|
||||
_saveaccountconf_mutable Dynu_Secret "$Dynu_Secret"
|
||||
|
||||
if [ -z "$Dynu_Token" ]; then
|
||||
_info "Getting Dynu token."
|
||||
|
|
@ -69,6 +71,8 @@ dns_dynu_rm() {
|
|||
fulldomain=$1
|
||||
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
|
||||
Dynu_ClientId=""
|
||||
Dynu_Secret=""
|
||||
|
|
@ -78,8 +82,8 @@ dns_dynu_rm() {
|
|||
fi
|
||||
|
||||
#save the client id and secret to the account conf file.
|
||||
_saveaccountconf Dynu_ClientId "$Dynu_ClientId"
|
||||
_saveaccountconf Dynu_Secret "$Dynu_Secret"
|
||||
_saveaccountconf_mutable Dynu_ClientId "$Dynu_ClientId"
|
||||
_saveaccountconf_mutable Dynu_Secret "$Dynu_Secret"
|
||||
|
||||
if [ -z "$Dynu_Token" ]; then
|
||||
_info "Getting Dynu token."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue