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
1e5e03cc
Commit
1e5e03cc
authored
Mar 08, 2017
by
nytral
Browse files
typo...
parent
d3c4cd82
Changes
1
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_nsone.sh
View file @
1e5e03cc
...
...
@@ -62,7 +62,7 @@ dns_nsone_add() {
record_id
=
$(
printf
"%s
\n
"
"
$response
"
| _egrep_o
"
\"
domain
\"
:
\"
$fulldomain
.
\"
,[^{]*
\"
type
\"
:
\"
TXT
\"
,
\"
id
\"
:
\"
[^,]*
\"
"
| _head_n 1 |
cut
-d
:
-f7
|
cut
-d
,
-f1
)
_debug
"record_id"
"
$record_id
"
_nsone_rest POST
"zones/
$_domain
_
/
$fulldomain
/TXT"
"{
\"
answers
\"
: [{
\"
answer
\"
: [
\"
$txtvalue
\"
]}],
\"
type
\"
:
\"
TXT
\"
,
\"
domain
\"
:
\"
$fulldomain
\"
,
\"
zone
\"
:
\"
$_domain
\"
}"
_nsone_rest POST
"zones/
$_domain
/
$fulldomain
/TXT"
"{
\"
answers
\"
: [{
\"
answer
\"
: [
\"
$txtvalue
\"
]}],
\"
type
\"
:
\"
TXT
\"
,
\"
domain
\"
:
\"
$fulldomain
\"
,
\"
zone
\"
:
\"
$_domain
\"
}"
if
[
"
$?
"
=
"0"
]
&&
_contains
"
$response
"
"
$fulldomain
"
;
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