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
a1e1bfc7
Commit
a1e1bfc7
authored
Mar 01, 2017
by
nytral
Browse files
removed useless code
parent
29992f54
Changes
1
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_me.sh
View file @
a1e1bfc7
...
@@ -91,11 +91,6 @@ dns_me_rm() {
...
@@ -91,11 +91,6 @@ dns_me_rm() {
_debug
"Getting txt records"
_debug
"Getting txt records"
_me_rest GET
"
${
_domain_id
}
/records?recordName=
$_sub_domain
&type=TXT"
_me_rest GET
"
${
_domain_id
}
/records?recordName=
$_sub_domain
&type=TXT"
if
!
printf
"%s"
"
$response
"
|
grep
\"
success
\"
:true
>
/dev/null
;
then
_err
"Error"
return
1
fi
count
=
$(
printf
"%s
\n
"
"
$response
"
| _egrep_o
"
\"
totalRecords
\"
:[^,]*"
|
cut
-d
:
-f
2
)
count
=
$(
printf
"%s
\n
"
"
$response
"
| _egrep_o
"
\"
totalRecords
\"
:[^,]*"
|
cut
-d
:
-f
2
)
_debug count
"
$count
"
_debug count
"
$count
"
if
[
"
$count
"
=
"0"
]
;
then
if
[
"
$count
"
=
"0"
]
;
then
...
@@ -107,10 +102,7 @@ dns_me_rm() {
...
@@ -107,10 +102,7 @@ dns_me_rm() {
_err
"Can not get record id to remove."
_err
"Can not get record id to remove."
return
1
return
1
fi
fi
if
!
_me_rest DELETE
"
$_domain_id
/records/
$record_id
"
;
then
_me_rest DELETE
"
$_domain_id
/records/
$record_id
"
_err
"Delete record error."
return
1
fi
_contains
"
$response
"
'"success":true'
_contains
"
$response
"
'"success":true'
fi
fi
}
}
...
...
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