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
872bfe47
Commit
872bfe47
authored
Oct 11, 2017
by
neilpang
Browse files
fix for PR
https://github.com/Neilpang/acme.sh/pull/1069
parent
70bd493a
Changes
1
Show whitespace changes
Inline
Side-by-side
dnsapi/dns_aws.sh
View file @
872bfe47
...
...
@@ -87,6 +87,7 @@ _get_root() {
_debug
"response"
"
$response
"
while
true
;
do
h
=
$(
printf
"%s"
"
$domain
"
|
cut
-d
.
-f
$i
-100
)
_debug2
"Checking domain:
$h
"
if
[
-z
"
$h
"
]
;
then
if
_contains
"
$response
"
"<IsTruncated>true</IsTruncated>"
&&
_contains
"
$response
"
"<NextMarker>"
;
then
_debug
"IsTruncated"
...
...
@@ -102,24 +103,24 @@ _get_root() {
fi
fi
#not valid
_err
"Invalid domain"
return
1
fi
if
_contains
"
$response
"
"<Name>
$h
.</Name>"
;
then
hostedzone
=
"
$(
echo
"
$response
"
|
sed
's/<HostedZone>/#&/g'
|
tr
'#'
'\n'
| _egrep_o
"<HostedZone><Id>[^<]*<.Id><Name>
$h
.<.Name>.*<PrivateZone>false<.PrivateZone>.*<.HostedZone>"
)
"
_debug hostedzone
"
$hostedzone
"
if
[
-z
"
$hostedzone
"
]
;
then
_err
"Error, can not get hostedzone."
return
1
fi
if
[
"
$hostedzone
"
]
;
then
_domain_id
=
$(
printf
"%s
\n
"
"
$hostedzone
"
| _egrep_o
"<Id>.*<.Id>"
|
head
-n
1 | _egrep_o
">.*<"
|
tr
-d
"<>"
)
if
[
"
$_domain_id
"
]
;
then
_sub_domain
=
$(
printf
"%s"
"
$domain
"
|
cut
-d
.
-f
1-
$p
)
_domain
=
$h
return
0
fi
_err
"Can not find domain id:
$h
"
return
1
fi
fi
p
=
$i
i
=
$(
_math
"
$i
"
+ 1
)
done
...
...
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