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
eef4acd0
Commit
eef4acd0
authored
Jun 14, 2017
by
neilpang
Browse files
fix
https://github.com/Neilpang/acme.sh/issues/874
parent
450efea1
Changes
1
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_dynu.sh
View file @
eef4acd0
...
@@ -122,18 +122,30 @@ dns_dynu_rm() {
...
@@ -122,18 +122,30 @@ dns_dynu_rm() {
# _domain_name=domain.com
# _domain_name=domain.com
_get_root
()
{
_get_root
()
{
domain
=
$1
domain
=
$1
if
!
_dynu_rest GET
"dns/getroot/
$domain
"
;
then
i
=
2
return
1
p
=
1
fi
while
true
;
do
h
=
$(
printf
"%s"
"
$domain
"
|
cut
-d
.
-f
$i
-100
)
_debug h
"
$h
"
if
[
-z
"
$h
"
]
;
then
#not valid
return
1
fi
if
!
_contains
"
$response
"
"domain_name"
;
then
if
!
_dynu_rest GET
"dns/get/
$h
"
;
then
_debug
"Domain name not found."
return
1
return
1
fi
fi
if
_contains
"
$response
"
"
\"
name
\"
:
\"
$h
\"
"
>
/dev/null
;
then
_domain_name
=
$h
_node
=
$(
printf
"%s"
"
$domain
"
|
cut
-d
.
-f
1-
$p
)
return
0
fi
p
=
$i
i
=
$(
_math
"
$i
"
+ 1
)
done
return
1
_domain_name
=
$(
printf
"%s"
"
$response
"
|
tr
-d
"{}"
|
cut
-d
,
-f
1 |
cut
-d
:
-f
2 |
cut
-d
'"'
-f
2
)
_node
=
$(
printf
"%s"
"
$response
"
|
tr
-d
"{}"
|
cut
-d
,
-f
3 |
cut
-d
:
-f
2 |
cut
-d
'"'
-f
2
)
return
0
}
}
_get_recordid
()
{
_get_recordid
()
{
...
...
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