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
1b475cf9
Unverified
Commit
1b475cf9
authored
Feb 10, 2020
by
Brian Hartvigsen
Browse files
Remove -q from greps
parent
d07172a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
deploy/synology_dsm.sh
View file @
1b475cf9
...
...
@@ -116,7 +116,7 @@ synology_dsm_deploy() {
_savedeployconf SYNO_Certificate
"
$SYNO_Certificate
"
default
=
false
if
echo
"
$response
"
|
sed
-n
"s/.*
\"
desc
\"
:
\"
$SYNO_Certificate
\"
,
\(
[^{]*
\)
.*/
\1
/p"
|
grep
-q
--
'is_default":true'
;
then
if
echo
"
$response
"
|
sed
-n
"s/.*
\"
desc
\"
:
\"
$SYNO_Certificate
\"
,
\(
[^{]*
\)
.*/
\1
/p"
|
grep
--
'is_default":true'
>
/dev/null
;
then
default
=
true
fi
_debug2 default
"
$default
"
...
...
@@ -138,8 +138,8 @@ synology_dsm_deploy() {
response
=
$(
_post
"
$content
"
"
$_base_url
/webapi/entry.cgi?api=SYNO.Core.Certificate&method=import&version=1&SynoToken=
$token
"
""
"POST"
"multipart/form-data; boundary=
${
delim
}
"
)
_debug3 response
"
$response
"
if
!
echo
"
$response
"
|
grep
-q
'"error":'
;
then
if
echo
"
$response
"
|
grep
-q
'"restart_httpd":true'
;
then
if
!
echo
"
$response
"
|
grep
'"error":'
>
/dev/null
;
then
if
echo
"
$response
"
|
grep
'"restart_httpd":true'
>
/dev/null
;
then
_info
"http services were restarted"
else
_info
"http services were NOT restarted"
...
...
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