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
f763e1ed
Commit
f763e1ed
authored
Dec 08, 2017
by
Aarup
Browse files
fix contains usage
parent
dbc3ad13
Changes
1
Show whitespace changes
Inline
Side-by-side
dnsapi/dns_unoeuro.sh
View file @
f763e1ed
...
@@ -114,12 +114,12 @@ dns_unoeuro_rm() {
...
@@ -114,12 +114,12 @@ dns_unoeuro_rm() {
_debug
"Getting txt records"
_debug
"Getting txt records"
_uno_rest GET
"my/products/
$h
/dns/records"
_uno_rest GET
"my/products/
$h
/dns/records"
if
!
_contains
"
$response
"
"
\"
status
\"
: 200"
>
/dev/null
;
then
if
!
_contains
"
$response
"
"
\"
status
\"
: 200"
;
then
_err
"Error"
_err
"Error"
return
1
return
1
fi
fi
if
!
_contains
"
$response
"
"
$_sub_domain
"
>
/dev/null
;
then
if
!
_contains
"
$response
"
"
$_sub_domain
"
;
then
_info
"Don't need to remove."
_info
"Don't need to remove."
else
else
record_line_number
=
$(
echo
"
$response
"
|
grep
-n
"
$_sub_domain
"
|
cut
-d
:
-f
1
)
record_line_number
=
$(
echo
"
$response
"
|
grep
-n
"
$_sub_domain
"
|
cut
-d
:
-f
1
)
...
@@ -163,7 +163,7 @@ _get_root() {
...
@@ -163,7 +163,7 @@ _get_root() {
return
1
return
1
fi
fi
if
_contains
"
$response
"
"
\"
status
\"
: 200"
>
/dev/null
;
then
if
_contains
"
$response
"
"
\"
status
\"
: 200"
;
then
_domain_id
=
$h
_domain_id
=
$h
if
[
"
$_domain_id
"
]
;
then
if
[
"
$_domain_id
"
]
;
then
_sub_domain
=
$(
printf
"%s"
"
$domain
"
|
cut
-d
.
-f
1-
$p
)
_sub_domain
=
$(
printf
"%s"
"
$domain
"
|
cut
-d
.
-f
1-
$p
)
...
...
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