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
040e0d83
Unverified
Commit
040e0d83
authored
Sep 03, 2020
by
neil
Committed by
GitHub
Sep 03, 2020
Browse files
Merge pull request #3146 from ym/dev
fix misaka.io api: breaking changes introduced by apiv1
parents
0c9c1ae6
b5c382f9
Changes
1
Show whitespace changes
Inline
Side-by-side
dnsapi/dns_misaka.sh
View file @
040e0d83
...
...
@@ -47,7 +47,7 @@ dns_misaka_add() {
if
[
"
$count
"
=
"0"
]
;
then
_info
"Adding record"
if
_misaka_rest P
U
T
"zones/
${
_domain
}
/recordsets/
${
_sub_domain
}
/TXT"
"{
\"
records
\"
:[{
\"
value
\"
:
\"\\\"
$txtvalue
\\\"\"
}],
\"
filters
\"
:[],
\"
ttl
\"
:1}"
;
then
if
_misaka_rest P
OS
T
"zones/
${
_domain
}
/recordsets/
${
_sub_domain
}
/TXT"
"{
\"
records
\"
:[{
\"
value
\"
:
\"\\\"
$txtvalue
\\\"\"
}],
\"
filters
\"
:[],
\"
ttl
\"
:1}"
;
then
_debug response
"
$response
"
if
_contains
"
$response
"
"
$_sub_domain
"
;
then
_info
"Added"
...
...
@@ -61,7 +61,7 @@ dns_misaka_add() {
else
_info
"Updating record"
_misaka_rest P
OS
T
"zones/
${
_domain
}
/recordsets/
${
_sub_domain
}
/TXT?append=true"
"{
\"
records
\"
: [{
\"
value
\"
:
\"\\\"
$txtvalue
\\\"\"
}],
\"
ttl
\"
:1}"
_misaka_rest P
U
T
"zones/
${
_domain
}
/recordsets/
${
_sub_domain
}
/TXT?append=true"
"{
\"
records
\"
: [{
\"
value
\"
:
\"\\\"
$txtvalue
\\\"\"
}],
\"
ttl
\"
:1}"
if
[
"
$?
"
=
"0"
]
&&
_contains
"
$response
"
"
$_sub_domain
"
;
then
_info
"Updated!"
#todo: check if the record takes effect
...
...
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