Update dns_azure.sh

This commit is contained in:
neil 2018-01-25 22:58:11 +08:00 committed by GitHub
parent 441c26dd32
commit 91607bb2a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 192 additions and 196 deletions

View File

@ -7,8 +7,7 @@
#
# Ref: https://docs.microsoft.com/en-us/rest/api/dns/recordsets/createorupdate
#
dns_azure_add()
{
dns_azure_add() {
fulldomain=$1
txtvalue=$2
@ -58,7 +57,6 @@ dns_azure_add()
_saveaccountconf_mutable AZUREDNS_APPID "$AZUREDNS_APPID"
_saveaccountconf_mutable AZUREDNS_CLIENTSECRET "$AZUREDNS_CLIENTSECRET"
accesstoken=$(_azure_getaccess_token "$AZUREDNS_TENANTID" "$AZUREDNS_APPID" "$AZUREDNS_CLIENTSECRET")
if ! _get_root "$fulldomain" "$AZUREDNS_SUBSCRIPTIONID" "$accesstoken"; then
@ -86,8 +84,7 @@ dns_azure_add()
#
# Ref: https://docs.microsoft.com/en-us/rest/api/dns/recordsets/delete
#
dns_azure_rm()
{
dns_azure_rm() {
fulldomain=$1
txtvalue=$2
@ -209,7 +206,6 @@ _azure_getaccess_token() {
return 1
fi
printf "%s" "$accesstoken"
return 0
}