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
0c63090a
Commit
0c63090a
authored
Feb 10, 2018
by
neilpang
Browse files
fix format
parent
0159277d
Changes
1
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_zonomi.sh
View file @
0c63090a
...
...
@@ -35,7 +35,7 @@ dns_zonomi_add() {
if
_contains
"
$response
"
"<record"
;
then
_debug
"get and update records"
_qstr
=
"action[1]=SET&type[1]=TXT&name[1]=
$fulldomain
&value[1]=
$txtvalue
"
_qindex
=
2
;
_qindex
=
2
for
t
in
$(
echo
"
$response
"
|
tr
-d
"
\r\n
"
| _egrep_o
'<action.*</action>'
|
tr
"<"
"
\n
"
|
grep
record |
grep
'type="TXT"'
|
cut
-d
'"'
-f
6
)
;
do
_debug2 t
"
$t
"
_qstr
=
"
$_qstr
&action[
$_qindex
]=SET&type[
$_qindex
]=TXT&name[
$_qindex
]=
$fulldomain
&value[
$_qindex
]=
$t
"
...
...
@@ -71,7 +71,6 @@ dns_zonomi_rm() {
_zm_request
()
{
qstr
=
"
$1
"
_debug2
"action"
"
$action
"
_debug2
"qstr"
"
$qstr
"
_zm_url
=
"
$ZM_Api
?api_key=
$ZM_Key
&
$qstr
"
...
...
@@ -79,7 +78,6 @@ _zm_request() {
response
=
"
$(
_get
"
$_zm_url
"
)
"
if
[
"
$?
"
!=
"0"
]
;
then
_err
"error
$ep
"
return
1
fi
_debug2 response
"
$response
"
...
...
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