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
8995d343
Commit
8995d343
authored
Mar 21, 2018
by
Ivar Larsson
Browse files
_contains instead of echo
parent
5f9b0675
Changes
1
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_loopia.sh
View file @
8995d343
...
@@ -187,7 +187,7 @@ _loopia_update_record() {
...
@@ -187,7 +187,7 @@ _loopia_update_record() {
response
=
"
$(
_post
"
$xml_content
"
"
$LOOPIA_Api
"
""
"POST"
)
"
response
=
"
$(
_post
"
$xml_content
"
"
$LOOPIA_Api
"
""
"POST"
)
"
if
!
echo
"
$response
"
|
grep
"OK"
>
/dev/null
;
then
if
!
_contains
"
$response
"
"OK"
;
then
_err
"Error"
_err
"Error"
return
1
return
1
fi
fi
...
@@ -219,7 +219,7 @@ _loopia_add_record() {
...
@@ -219,7 +219,7 @@ _loopia_add_record() {
response
=
"
$(
_post
"
$xml_content
"
"
$LOOPIA_Api
"
""
"POST"
)
"
response
=
"
$(
_post
"
$xml_content
"
"
$LOOPIA_Api
"
""
"POST"
)
"
if
!
echo
"
$response
"
|
grep
"OK"
>
/dev/null
;
then
if
!
_contains
"
$response
"
"OK"
;
then
_err
"Error"
_err
"Error"
return
1
return
1
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