Skip to content

Commit

Permalink
Merge pull request #2671 from Rayzilt/master
Browse files Browse the repository at this point in the history
dns_lexicon.sh: Add extra variable _API_KEY
  • Loading branch information
Neilpang committed Jan 7, 2020
2 parents c3fbc36 + f174d7d commit c6f7b7f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions dnsapi/dns_lexicon.sh
Expand Up @@ -63,6 +63,16 @@ _lexicon_init() {
_saveaccountconf_mutable "$Lx_domaintoken" "$Lx_domaintoken_v"
eval export "$Lx_domaintoken"
fi

# shellcheck disable=SC2018,SC2019
Lx_api_key=$(echo LEXICON_"${PROVIDER}"_API_KEY | tr 'a-z' 'A-Z')
eval "$Lx_api_key=\${$Lx_api_key:-$(_readaccountconf_mutable "$Lx_api_key")}"
Lx_api_key_v=$(eval echo \$"$Lx_api_key")
_secure_debug "$Lx_api_key" "$Lx_api_key_v"
if [ "$Lx_api_key_v" ]; then
_saveaccountconf_mutable "$Lx_api_key" "$Lx_api_key_v"
eval export "$Lx_api_key"
fi
}

######## Public functions #####################
Expand Down

0 comments on commit c6f7b7f

Please sign in to comment.