neil
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
201 additions and
205 deletions
-
dnsapi/dns_azure.sh
|
|
@ -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 |
|
|
|
} |
|
|
|
|
|
|
|