refactoring changes from sequpgrade (endReturn, ...) and some modernizations

This commit is contained in:
2023-01-03 15:49:08 +01:00
parent 215135e8aa
commit 3c22d5729f
69 changed files with 553 additions and 654 deletions

View File

@@ -40,7 +40,7 @@ step_1_info() { echo "Status"; }
step_1_alias() { echo "status"; }
step_1() {
getVersions
if [[ -z "${versionNow}" ]] ; then
if [[ -z "${versionNow}" ]] ; then
info "Version ${versionNew} available to install"
elif [[ ${versionNew} == ${versionNow} ]] ; then
color green
@@ -57,7 +57,7 @@ step_10() {
local loBackup="${sc_synadmLoc}.bu"
local loTemp="/tmp/${toolName}.tar.gz"
# get download URL
# get download URL
getVersions
if [[ -e "${sc_synadmLoc}" ]]; then
@@ -69,7 +69,7 @@ step_10() {
exe mv "${loBackup}" "${sc_synadmLoc}" 2>/dev/null
else
exe tar -xf "${loTemp}" -C "$(dirname -- "${sc_synadmLoc}")"
endReturn -o $? "Extraction failed"
endReturn "Extraction failed"
exe mv "$(dirname -- "${sc_synadmLoc}")/${toolName}-${versionNew}" "${sc_synadmLoc}"
exe chown -R root: "${sc_synadmLoc}"
info "Downloaded to ${sc_synadmLoc}"
@@ -90,7 +90,7 @@ server {
server_name _;
access_log /var/log/nginx/synapse_admin_access.log;
error_log /var/log/nginx/synapse_admin_error.log;
error_log /var/log/nginx/synapse_admin_error.log;
include /etc/nginx/ssl.conf;
error_page 497 https://\$host:\$server_port\$request_uri;