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
ab5c1b0a
Commit
ab5c1b0a
authored
Jan 31, 2017
by
neilpang
Browse files
minor
parent
53fa16d3
Changes
1
Show whitespace changes
Inline
Side-by-side
dnsapi/dns_lua.sh
View file @
ab5c1b0a
...
...
@@ -63,7 +63,7 @@ dns_lua_add() {
_err
"Add txt record error."
else
_info
"Updating record"
record_id
=
$(
printf
"%s
\n
"
"
$response
"
| _egrep_o
"
\"
id
\"
:[^,]*,
\"
name
\"
:
\"
$fulldomain
.
\"
,
\"
type
\"
:
\"
TXT
\"
"
|
cut
-d
:
-f2
|
cut
-d
,
-f1
)
record_id
=
$(
printf
"%s
\n
"
"
$response
"
| _egrep_o
"
\"
id
\"
:[^,]*,
\"
name
\"
:
\"
$fulldomain
.
\"
,
\"
type
\"
:
\"
TXT
\"
"
|
_head_n 1 |
cut
-d
:
-f2
|
cut
-d
,
-f1
)
_debug
"record_id"
"
$record_id
"
_LUA_rest PUT
"zones/
$_domain_id
/records/
$record_id
"
"{
\"
id
\"
:
\"
$record_id
\"
,
\"
type
\"
:
\"
TXT
\"
,
\"
name
\"
:
\"
$fulldomain
.
\"
,
\"
content
\"
:
\"
$txtvalue
\"
,
\"
zone_id
\"
:
\"
$_domain_id
\"
,
\"
ttl
\"
:120}"
...
...
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