Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
e485e8f6
Commit
e485e8f6
authored
Apr 04, 2017
by
neil
Committed by
GitHub
Apr 04, 2017
Browse files
Merge pull request #770 from Neilpang/dev
Dev
parents
ad541f71
fde8ea08
Changes
1
Show whitespace changes
Inline
Side-by-side
dnsapi/dns_aws.sh
View file @
e485e8f6
...
@@ -88,6 +88,19 @@ _get_root() {
...
@@ -88,6 +88,19 @@ _get_root() {
while
true
;
do
while
true
;
do
h
=
$(
printf
"%s"
"
$domain
"
|
cut
-d
.
-f
$i
-100
)
h
=
$(
printf
"%s"
"
$domain
"
|
cut
-d
.
-f
$i
-100
)
if
[
-z
"
$h
"
]
;
then
if
[
-z
"
$h
"
]
;
then
if
_contains
"
$response
"
"<IsTruncated>true</IsTruncated>"
&&
_contains
"
$response
"
"<NextMarker>"
;
then
_debug
"IsTruncated"
_nextMarker
=
"
$(
echo
"
$response
"
| _egrep_o
"<NextMarker>.*</NextMarker>"
|
cut
-d
'>'
-f
2 |
cut
-d
'<'
-f
1
)
"
_debug
"NextMarker"
"
$_nextMarker
"
if
aws_rest GET
"2013-04-01/hostedzone"
"marker=
$_nextMarker
"
;
then
_debug
"Truncated request OK"
i
=
2
p
=
1
continue
else
_err
"Truncated request error."
fi
fi
#not valid
#not valid
return
1
return
1
fi
fi
...
@@ -208,6 +221,9 @@ aws_rest() {
...
@@ -208,6 +221,9 @@ aws_rest() {
_debug _H2
"
$_H2
"
_debug _H2
"
$_H2
"
url
=
"
$AWS_URL
/
$ep
"
url
=
"
$AWS_URL
/
$ep
"
if
[
"
$qsr
"
]
;
then
url
=
"
$AWS_URL
/
$ep
?
$qsr
"
fi
if
[
"
$mtd
"
=
"GET"
]
;
then
if
[
"
$mtd
"
=
"GET"
]
;
then
response
=
"
$(
_get
"
$url
"
)
"
response
=
"
$(
_get
"
$url
"
)
"
...
...
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