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
52b94516
Commit
52b94516
authored
Feb 07, 2018
by
neilpang
Browse files
fix
https://github.com/Neilpang/acme.sh/issues/1247
parent
584fb290
Changes
1
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_yandex.sh
View file @
52b94516
...
...
@@ -18,7 +18,6 @@ dns_yandex_add() {
curDomain
=
$(
_PDD_get_domain
"
$fulldomain
"
)
_debug
"Found suitable domain in pdd:
$curDomain
"
curSubdomain
=
"
$(
echo
"
${
fulldomain
}
"
|
sed
-e
"s@.
${
curDomain
}
\$
@@"
)
"
curData
=
"domain=
${
curDomain
}
&type=TXT&subdomain=
${
curSubdomain
}
&ttl=360&content=
${
txtvalue
}
"
curUri
=
"https://pddimp.yandex.ru/api2/admin/dns/add"
curResult
=
"
$(
_post
"
${
curData
}
"
"
${
curUri
}
"
)
"
...
...
@@ -36,7 +35,6 @@ dns_yandex_rm() {
curDomain
=
$(
_PDD_get_domain
"
$fulldomain
"
)
_debug
"Found suitable domain in pdd:
$curDomain
"
curSubdomain
=
"
$(
echo
"
${
fulldomain
}
"
|
sed
-e
"s@.
${
curDomain
}
\$
@@"
)
"
curUri
=
"https://pddimp.yandex.ru/api2/admin/dns/del"
curData
=
"domain=
${
curDomain
}
&record_id=
${
record_id
}
"
...
...
@@ -61,7 +59,7 @@ _PDD_get_domain() {
__last
=
1
fi
__all_domains
=
"
$__all_domains
$(
echo
"
$res1
"
|
sed
-e
"s@,@
\n
@g
"
|
grep
'"name"'
|
cut
-d
:
-f2
|
sed
-e
's@"@@g'
)
"
__all_domains
=
"
$__all_domains
$(
echo
"
$res1
"
|
tr
","
"
\n
"
|
grep
'"name"'
|
cut
-d
:
-f2
|
sed
-e
's@"@@g'
)
"
__page
=
$(
_math
$__page
+ 1
)
done
...
...
@@ -72,6 +70,8 @@ _PDD_get_domain() {
_debug
"finding zone for domain
$__t
"
for
d
in
$__all_domains
;
do
if
[
"
$d
"
=
"
$__t
"
]
;
then
p
=
$(
_math
$k
- 1
)
curSubdomain
=
"
$(
echo
"
$fulldomain
"
|
cut
-d
.
-f
1-
$p
)
"
echo
"
$__t
"
return
fi
...
...
@@ -98,7 +98,6 @@ pdd_get_record_id() {
curDomain
=
$(
_PDD_get_domain
"
$fulldomain
"
)
_debug
"Found suitable domain in pdd:
$curDomain
"
curSubdomain
=
"
$(
echo
"
${
fulldomain
}
"
|
sed
-e
"s@.
${
curDomain
}
\$
@@"
)
"
curUri
=
"https://pddimp.yandex.ru/api2/admin/dns/list?domain=
${
curDomain
}
"
curResult
=
"
$(
_get
"
${
curUri
}
"
| _normalizeJson
)
"
...
...
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