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
d6f8d637
Commit
d6f8d637
authored
Feb 19, 2018
by
neilpang
Browse files
fix
https://github.com/Neilpang/acme.sh/issues/1286
parent
28b09295
Changes
1
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_yandex.sh
View file @
d6f8d637
...
@@ -16,7 +16,7 @@ dns_yandex_add() {
...
@@ -16,7 +16,7 @@ dns_yandex_add() {
_PDD_credentials
||
return
1
_PDD_credentials
||
return
1
export
_H1
=
"PddToken:
$PDD_Token
"
export
_H1
=
"PddToken:
$PDD_Token
"
curDomain
=
$(
_PDD_get_domain
"
$fulldomain
"
)
_PDD_get_domain
"
$fulldomain
"
_debug
"Found suitable domain in pdd:
$curDomain
"
_debug
"Found suitable domain in pdd:
$curDomain
"
curData
=
"domain=
${
curDomain
}
&type=TXT&subdomain=
${
curSubdomain
}
&ttl=360&content=
${
txtvalue
}
"
curData
=
"domain=
${
curDomain
}
&type=TXT&subdomain=
${
curSubdomain
}
&ttl=360&content=
${
txtvalue
}
"
curUri
=
"https://pddimp.yandex.ru/api2/admin/dns/add"
curUri
=
"https://pddimp.yandex.ru/api2/admin/dns/add"
...
@@ -33,7 +33,7 @@ dns_yandex_rm() {
...
@@ -33,7 +33,7 @@ dns_yandex_rm() {
record_id
=
$(
pdd_get_record_id
"
${
fulldomain
}
"
)
record_id
=
$(
pdd_get_record_id
"
${
fulldomain
}
"
)
_debug
"Result:
$record_id
"
_debug
"Result:
$record_id
"
curDomain
=
$(
_PDD_get_domain
"
$fulldomain
"
)
_PDD_get_domain
"
$fulldomain
"
_debug
"Found suitable domain in pdd:
$curDomain
"
_debug
"Found suitable domain in pdd:
$curDomain
"
curUri
=
"https://pddimp.yandex.ru/api2/admin/dns/del"
curUri
=
"https://pddimp.yandex.ru/api2/admin/dns/del"
...
@@ -72,8 +72,8 @@ _PDD_get_domain() {
...
@@ -72,8 +72,8 @@ _PDD_get_domain() {
if
[
"
$d
"
=
"
$__t
"
]
;
then
if
[
"
$d
"
=
"
$__t
"
]
;
then
p
=
$(
_math
$k
- 1
)
p
=
$(
_math
$k
- 1
)
curSubdomain
=
"
$(
echo
"
$fulldomain
"
|
cut
-d
.
-f
"1-
$p
"
)
"
curSubdomain
=
"
$(
echo
"
$fulldomain
"
|
cut
-d
.
-f
"1-
$p
"
)
"
echo
"
$__t
"
curDomain
=
"
$__t
"
return
return
0
fi
fi
done
done
k
=
$(
_math
$k
+ 1
)
k
=
$(
_math
$k
+ 1
)
...
@@ -96,7 +96,7 @@ _PDD_credentials() {
...
@@ -96,7 +96,7 @@ _PDD_credentials() {
pdd_get_record_id
()
{
pdd_get_record_id
()
{
fulldomain
=
"
${
1
}
"
fulldomain
=
"
${
1
}
"
curDomain
=
$(
_PDD_get_domain
"
$fulldomain
"
)
_PDD_get_domain
"
$fulldomain
"
_debug
"Found suitable domain in pdd:
$curDomain
"
_debug
"Found suitable domain in pdd:
$curDomain
"
curUri
=
"https://pddimp.yandex.ru/api2/admin/dns/list?domain=
${
curDomain
}
"
curUri
=
"https://pddimp.yandex.ru/api2/admin/dns/list?domain=
${
curDomain
}
"
...
...
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