Persist dnsimple account id in config

This commit is contained in:
vin01 2021-07-05 08:53:08 +02:00
parent a7df16db17
commit 294e6d32ee
No known key found for this signature in database
GPG Key ID: 885C28C3B043329D

View File

@ -124,8 +124,9 @@ _get_root() {
_get_account_id() {
_debug "retrive account id"
# shellcheck disable=SC2154
DNSimple_ACCOUNT_ID="${DNSimple_ACCOUNT_ID:-$(_readaccountconf_mutable DNSimple_ACCOUNT_ID)}"
if [ -n "$DNSimple_ACCOUNT_ID" ]; then
_saveaccountconf_mutable DNSimple_ACCOUNT_ID "$DNSimple_ACCOUNT_ID"
_account_id="$DNSimple_ACCOUNT_ID"
else
if ! _dnsimple_rest GET "whoami"; then