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
9ec54ef8
Commit
9ec54ef8
authored
Jul 09, 2017
by
Vladimir Berezhnoy
Browse files
shfmt fixes
parent
256cb90f
Changes
1
Show whitespace changes
Inline
Side-by-side
dnsapi/dns_yandex.sh
View file @
9ec54ef8
...
@@ -16,8 +16,8 @@ dns_yandex_add() {
...
@@ -16,8 +16,8 @@ dns_yandex_add() {
_PDD_credentials
||
exit
1
_PDD_credentials
||
exit
1
export
_H1
=
"PddToken:
$PDD_Token
"
export
_H1
=
"PddToken:
$PDD_Token
"
curDomain
=
"
$(
echo
"
${
fulldomain
}
"
| rev |
cut
-d
.
-f
1-2 | rev
)
"
curDomain
=
"
$(
echo
"
${
fulldomain
}
"
| rev |
cut
-d
.
-f
1-2 | rev
)
"
curSubdomain
=
"
$(
echo
"
${
fulldomain
}
"
| rev |
cut
-d
.
-f
3- | rev
)
"
curSubdomain
=
"
$(
echo
"
${
fulldomain
}
"
| rev |
cut
-d
.
-f
3- | rev
)
"
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"
curResult
=
"
$(
_post
"
${
curData
}
"
"
${
curUri
}
"
)
"
curResult
=
"
$(
_post
"
${
curData
}
"
"
${
curUri
}
"
)
"
...
@@ -32,8 +32,8 @@ dns_yandex_rm() {
...
@@ -32,8 +32,8 @@ dns_yandex_rm() {
export
_H1
=
"PddToken:
$PDD_Token
"
export
_H1
=
"PddToken:
$PDD_Token
"
record_id
=
$(
pdd_get_record_id
"
${
fulldomain
}
"
)
record_id
=
$(
pdd_get_record_id
"
${
fulldomain
}
"
)
curDomain
=
"
$(
echo
"
${
fulldomain
}
"
| rev |
cut
-d
.
-f
1-2 | rev
)
"
curDomain
=
"
$(
echo
"
${
fulldomain
}
"
| rev |
cut
-d
.
-f
1-2 | rev
)
"
curSubdomain
=
"
$(
echo
"
${
fulldomain
}
"
| rev |
cut
-d
.
-f
3- | rev
)
"
curSubdomain
=
"
$(
echo
"
${
fulldomain
}
"
| rev |
cut
-d
.
-f
3- | rev
)
"
curUri
=
"https://pddimp.yandex.ru/api2/admin/dns/del"
curUri
=
"https://pddimp.yandex.ru/api2/admin/dns/del"
curData
=
"domain=
${
curDomain
}
&record_id=
${
record_id
}
"
curData
=
"domain=
${
curDomain
}
&record_id=
${
record_id
}
"
curResult
=
"
$(
_post
"
${
curData
}
"
"
${
curUri
}
"
)
"
curResult
=
"
$(
_post
"
${
curData
}
"
"
${
curUri
}
"
)
"
...
@@ -67,4 +67,3 @@ for r in rs:
...
@@ -67,4 +67,3 @@ for r in rs:
exit
exit
"
"
}
}
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