Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
91607bb2
Unverified
Commit
91607bb2
authored
Jan 25, 2018
by
neil
Committed by
GitHub
Jan 25, 2018
Browse files
Update dns_azure.sh
parent
441c26dd
Changes
1
Show whitespace changes
Inline
Side-by-side
dnsapi/dns_azure.sh
View file @
91607bb2
...
@@ -7,8 +7,7 @@
...
@@ -7,8 +7,7 @@
#
#
# Ref: https://docs.microsoft.com/en-us/rest/api/dns/recordsets/createorupdate
# Ref: https://docs.microsoft.com/en-us/rest/api/dns/recordsets/createorupdate
#
#
dns_azure_add
()
dns_azure_add
()
{
{
fulldomain
=
$1
fulldomain
=
$1
txtvalue
=
$2
txtvalue
=
$2
...
@@ -58,7 +57,6 @@ dns_azure_add()
...
@@ -58,7 +57,6 @@ dns_azure_add()
_saveaccountconf_mutable AZUREDNS_APPID
"
$AZUREDNS_APPID
"
_saveaccountconf_mutable AZUREDNS_APPID
"
$AZUREDNS_APPID
"
_saveaccountconf_mutable AZUREDNS_CLIENTSECRET
"
$AZUREDNS_CLIENTSECRET
"
_saveaccountconf_mutable AZUREDNS_CLIENTSECRET
"
$AZUREDNS_CLIENTSECRET
"
accesstoken
=
$(
_azure_getaccess_token
"
$AZUREDNS_TENANTID
"
"
$AZUREDNS_APPID
"
"
$AZUREDNS_CLIENTSECRET
"
)
accesstoken
=
$(
_azure_getaccess_token
"
$AZUREDNS_TENANTID
"
"
$AZUREDNS_APPID
"
"
$AZUREDNS_CLIENTSECRET
"
)
if
!
_get_root
"
$fulldomain
"
"
$AZUREDNS_SUBSCRIPTIONID
"
"
$accesstoken
"
;
then
if
!
_get_root
"
$fulldomain
"
"
$AZUREDNS_SUBSCRIPTIONID
"
"
$accesstoken
"
;
then
...
@@ -86,8 +84,7 @@ dns_azure_add()
...
@@ -86,8 +84,7 @@ dns_azure_add()
#
#
# Ref: https://docs.microsoft.com/en-us/rest/api/dns/recordsets/delete
# Ref: https://docs.microsoft.com/en-us/rest/api/dns/recordsets/delete
#
#
dns_azure_rm
()
dns_azure_rm
()
{
{
fulldomain
=
$1
fulldomain
=
$1
txtvalue
=
$2
txtvalue
=
$2
...
@@ -209,7 +206,6 @@ _azure_getaccess_token() {
...
@@ -209,7 +206,6 @@ _azure_getaccess_token() {
return
1
return
1
fi
fi
printf
"%s"
"
$accesstoken
"
printf
"%s"
"
$accesstoken
"
return
0
return
0
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment