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
3fdbbafc
Unverified
Commit
3fdbbafc
authored
Jan 24, 2018
by
martgras
Committed by
GitHub
Jan 24, 2018
Browse files
fix getroot with multiple dns zones
parent
c82cd90e
Changes
1
Show whitespace changes
Inline
Side-by-side
dnsapi/dns_azure.sh
View file @
3fdbbafc
#!/usr/bin/env sh
#!/usr/bin/env sh
######## Public functions #####################
######## Public functions #####################
# Usage: add _acme-challenge.www.domain.com "XKrxpRBosdIKFzxW_CT3KLZNf6q0HG9i01zxXp5CPBs"
# Usage: add _acme-challenge.www.domain.com "XKrxpRBosdIKFzxW_CT3KLZNf6q0HG9i01zxXp5CPBs"
# Used to add txt record
# Used to add txt record
#
#
# Ref: https://docs.microsoft.com/en-us/rest/api/dns/recordsets/createorupdate
# Ref: https://docs.microsoft.com/en-us/rest/api/dns/recordsets/createorupdate
...
@@ -225,7 +224,7 @@ _get_root() {
...
@@ -225,7 +224,7 @@ _get_root() {
fi
fi
if
_contains
"
$response
"
"
\"
name
\"
:
\"
$h
\"
"
>
/dev/null
;
then
if
_contains
"
$response
"
"
\"
name
\"
:
\"
$h
\"
"
>
/dev/null
;
then
_domain_id
=
$(
printf
"%s
\n
"
"
$response
"
| _egrep_o
"
\
[
.
\"
id
\"
:
\"
[^
\"
]*
\"
"
|
head
-n
1 |
cut
-d
:
-f
2 |
tr
-d
\"
)
_domain_id
=
$(
printf
"%s
\n
"
"
$response
"
| _egrep_o
"
\
{
\"
id
\"
:
\"
[^
\"
]*
$h
\"
"
|
head
-n
1 |
cut
-d
:
-f
2 |
tr
-d
\"
)
if
[
"
$_domain_id
"
]
;
then
if
[
"
$_domain_id
"
]
;
then
_sub_domain
=
$(
printf
"%s"
"
$domain
"
|
cut
-d
.
-f
1-
$p
)
_sub_domain
=
$(
printf
"%s"
"
$domain
"
|
cut
-d
.
-f
1-
$p
)
_domain
=
$h
_domain
=
$h
...
@@ -238,4 +237,3 @@ _get_root() {
...
@@ -238,4 +237,3 @@ _get_root() {
done
done
return
1
return
1
}
}
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