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
0e341726
Unverified
Commit
0e341726
authored
Feb 06, 2021
by
F-Plass
Committed by
GitHub
Feb 06, 2021
Browse files
Edits after DoShellcheck
parent
a4f9746d
Changes
1
Hide whitespace changes
Inline
Side-by-side
deploy/truenas.sh
View file @
0e341726
...
...
@@ -121,7 +121,7 @@ truenas_deploy() {
_activateData
=
"{
\"
ui_certificate
\"
:
\"
${
_cert_id
}
\"
}"
_activate_result
=
"
$(
_post
"
$_activateData
"
"
$_api_url
/system/general"
""
"PUT"
"application/json"
)
"
_debug3 _activate_result
$(
echo
"
$_activate_result
"
)
_debug3 _activate_result
"
$_activate_result
"
_info
"Check if WebDAV certificate is the same as the WEB UI"
...
...
@@ -133,7 +133,7 @@ truenas_deploy() {
_debug _webdav_cert_id
"
$_webdav_cert_id
"
_webdav_data
=
"{
\"
certssl
\"
:
\"
${
_cert_id
}
\"
}"
_activate_webdav_cert
=
"
$(
_post
"
$_webdav_data
"
"
$_api_url
/webdav"
""
"PUT"
"application/json"
)
"
_webdav_new_cert_id
=
$(
echo
$_activate_webdav_cert
| _json_decode |
sed
-n
's/.*: \([0-9]\{1,\}\) }$/\1/p'
)
_webdav_new_cert_id
=
$(
echo
"
$_activate_webdav_cert
"
| _json_decode |
sed
-n
's/.*: \([0-9]\{1,\}\) }$/\1/p'
)
if
[
"
$_webdav_new_cert_id
"
-eq
"
$_cert_id
"
]
;
then
_info
"WebDAV Certificate update successfully"
else
...
...
@@ -157,7 +157,7 @@ truenas_deploy() {
_debug _ftp_cert_id
"
$_ftp_cert_id
"
_ftp_data
=
"{
\"
ssltls_certificate
\"
:
\"
${
_cert_id
}
\"
}"
_activate_ftp_cert
=
"
$(
_post
"
$_ftp_data
"
"
$_api_url
/ftp"
""
"PUT"
"application/json"
)
"
_ftp_new_cert_id
=
$(
echo
$_activate_ftp_cert
| _json_decode |
sed
-n
's/.*: \([0-9]\{1,\}\) }$/\1/p'
)
_ftp_new_cert_id
=
$(
echo
"
$_activate_ftp_cert
"
| _json_decode |
sed
-n
's/.*: \([0-9]\{1,\}\) }$/\1/p'
)
if
[
"
$_ftp_new_cert_id
"
-eq
"
$_cert_id
"
]
;
then
_info
"FTP Certificate update successfully"
else
...
...
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