Add .editorconfig and correct indentation for many seqs

This commit is contained in:
2022-03-14 21:27:29 +01:00
parent bb8b54597a
commit 71612aef94
34 changed files with 178 additions and 164 deletions

6
.editorconfig Normal file
View File

@@ -0,0 +1,6 @@
root = true
[*.{sh,cfg,example}]
charset = utf-8
indent_style = space
indent_size = 2

View File

@@ -50,10 +50,11 @@ step_2() {
step_3_info() { echo "Add system user"; }
step_3() {
exe adduser --system $DLD_USER --group --home "${DLD_CONFDIR}"
exe adduser --system $DLD_USER --group --home "${DLD_CONFDIR}"
}
step_4_info() { echo "Install sonarr"
step_4_info() {
echo "Install sonarr"
echoinfo "Default port: 8989"
}
step_4() {
@@ -453,12 +454,12 @@ step_21() {
[ ! -e "$pTar" ] && exe wget --content-disposition "$pUrl" -O "$pTar"
if [ -e "$pInstallDir" ]; then
prowlarrUpgrade=1
echoseq " [I] Stopping prowlarr service"
echoseq " Service will not be started automatically after update"
exe service prowlarr stop
echoseq " [I] Moving existing $pInstallDir as backup"
exe mv "$pInstallDir" "${pInstallDir}_bu_"`date +%Y%m%d-%H%M%S`
prowlarrUpgrade=1
echoseq " [I] Stopping prowlarr service"
echoseq " Service will not be started automatically after update"
exe service prowlarr stop
echoseq " [I] Moving existing $pInstallDir as backup"
exe mv "$pInstallDir" "${pInstallDir}_bu_"`date +%Y%m%d-%H%M%S`
fi
exe tar xvzf "$pTar" -C "${DLD_DIR}"
@@ -535,12 +536,12 @@ step_30() {
[ ! -e "$readarrTar" ] && exe wget --content-disposition "$lUrl" -O "$readarrTar"
if [ -e "$lInstallDir" ]; then
readarrUpgrade=1
echoseq " [I] Stopping readarr service"
echoseq " Service will not be started automatically after update"
exe service readarr stop
echoseq " [I] Moving existing $lInstallDir as backup"
exe mv "$lInstallDir" "${lInstallDir}_bu_"`date +%Y%m%d-%H%M%S`
readarrUpgrade=1
echoseq " [I] Stopping readarr service"
echoseq " Service will not be started automatically after update"
exe service readarr stop
echoseq " [I] Moving existing $lInstallDir as backup"
exe mv "$lInstallDir" "${lInstallDir}_bu_"`date +%Y%m%d-%H%M%S`
fi
exe tar xvf "$readarrTar" -C "${DLD_DIR}"

View File

@@ -26,7 +26,7 @@ step_1() {
exe apt install gnupg2 git lsb-release ssl-cert ca-certificates apt-transport-https \
tree locate software-properties-common dirmngr screen htop nano net-tools zip unzip \
curl ffmpeg ghostscript libfile-fcntllock-perl curl socat
}
}
step_2_info() { echo "Add universe and official nginx apt repositories"; }
step_2() {

View File

@@ -230,7 +230,7 @@ step_21() {
"mysql_virtual_alias_maps"\
"mysql_virtual_alias_domain_maps"\
"mysql_virtual_alias_domain_catchall_maps"\
)
)
for mtaFile in ${mtaMysqlFiles[@]}
do

View File

@@ -154,12 +154,13 @@ SyslogIdentifier=synapse
[Install]
WantedBy=multi-user.target"
step_10_info() { echo -n "Upgrade $toolName installation"
if [ $CONTEXT_HELP -eq 0 ] ; then
echo " at $MATRIX_HOME"
else
echo
fi
step_10_info() {
echo -n "Upgrade $toolName installation"
if [ $CONTEXT_HELP -eq 0 ] ; then
echo " at $MATRIX_HOME"
else
echo
fi
}
step_10_alias() { ALIAS="upgrade"; }
step_10() {
@@ -193,7 +194,7 @@ step_14() {
local synapseIP=localhost
shift
if [ ! -z $1 ]; then
synapseIP="$1"
synapseIP="$1"
fi
local apiCall="http://${synapseIP}:8008/_synapse/admin/v1/server_version"
@@ -229,7 +230,7 @@ step_16() {
done
if [ ! -z $1 ]; then
synapseIP="$1"
synapseIP="$1"
fi
local apiCall="http://${synapseIP}:8008/_synapse/admin/v2/users"
@@ -299,7 +300,7 @@ step_22() {
done
if [ ! -z $1 ]; then
synapseIP="$1"
synapseIP="$1"
fi
local apiCall="http://${synapseIP}:8008/_synapse/admin/v1/rooms"
@@ -340,7 +341,7 @@ step_24() {
fi
if [ ! -z $1 ]; then
synapseIP="$1"
synapseIP="$1"
fi
local apiCall="http://${synapseIP}:8008/_synapse/admin/v1/rooms/$roomId/members"
@@ -363,7 +364,7 @@ step_26() {
local synapseIP=localhost
if [ ! -z $1 ]; then
synapseIP="$1"
synapseIP="$1"
fi
local apiCall="http://${synapseIP}:8008/_synapse/admin/v1/rooms"

View File

@@ -128,11 +128,11 @@ motioneyeMediaDir="/var/lib/motioneye"
step_8_info() { echo "Create $toolName service"; }
step_8() {
exe cp "$motioneyeServiceSource" "$motioneyeServiceTarget"
endReturn -o $? "Creating service failed"
exe systemctl daemon-reload
exe systemctl enable motioneye
exe systemctl start motioneye
exe cp "$motioneyeServiceSource" "$motioneyeServiceTarget"
endReturn -o $? "Creating service failed"
exe systemctl daemon-reload
exe systemctl enable motioneye
exe systemctl start motioneye
}
motioneyeServiceSource="/usr/local/share/motioneye/extra/motioneye.systemd-unit-local"
motioneyeServiceTarget="/etc/systemd/system/motioneye.service"

View File

@@ -84,7 +84,7 @@ step_10() {
--remote|-r)
dbRemote="$2"
shift 2 ;;
*)
*)
break ;;
esac
done
@@ -136,7 +136,7 @@ step_11() {
--remote|-r)
dbRemote="$2"
shift 2 ;;
*)
*)
break ;;
esac
done
@@ -188,7 +188,7 @@ step_12() {
--remote|-r)
dbRemote="$2"
shift 2 ;;
*)
*)
break ;;
esac
done
@@ -219,7 +219,7 @@ step_14() {
--remote|-r)
dbRemote="$2"
shift 2 ;;
*)
*)
break ;;
esac
done
@@ -264,7 +264,7 @@ step_34() {
--remote|-r)
dbRemote="$2"
shift 2 ;;
*)
*)
break ;;
esac
done

View File

@@ -119,10 +119,10 @@ step_5() {
options="-e JWT_ENABLED=true -e JWT_SECRET="
# This is the only way to provide SECRET($2) to docker command line which handles all types of characters.
exe docker run -i -t -d -p ${onlyOfficePort}:80 ${options}"$secret" --restart=always \
-v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice \
-v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data \
-v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice \
-v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql "${dockerImageName}"
-v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice \
-v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data \
-v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice \
-v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql "${dockerImageName}"
else
echoerr " [W] Running $toolName without JWT (JSON Web Tokens)"
exe docker run -i -t -d -p ${onlyOfficePort}:80 --restart=always "${dockerImageName}"

View File

@@ -49,7 +49,7 @@ postCron="# -q quiet -N timestamping (overwrite existing file) -O target file
step_3_info() { echo "Configuration notes"; }
step_3_alias() { ALIAS="notes"; }
step_3() {
echo "$toolNotes"
echo "$toolNotes"
}
toolNotes="
# Reduce default message delay to 1 minute

View File

@@ -82,8 +82,10 @@ listen 80 default_server;
include ${snippetLetsencryptLoc};
}"
step_4_info() { echo "Installation of $phpName packages:"
echoinfo "$phpPackages"; }
step_4_info() {
echo "Installation of $phpName packages:"
echoinfo "$phpPackages"
}
step_4_alias() { ALIAS="php"; }
step_4() {
exe apt install $(eval echo $phpPackages) $aptOpt

View File

@@ -6,8 +6,10 @@ phpVersion="7.3"
phpName="php$phpVersion"
phpPackages="${phpName}-fpm ${phpName}-json ${phpName}-mysql ${phpName}-curl ${phpName}-intl ${phpName}-gd ${phpName}-zip ${phpName}-xml ${phpName}-mbstring php-imagick php-apcu"
step_1_info() { echo "Installation of $serverName packages:"
echoinfo "$serverPackages"; }
step_1_info() {
echo "Installation of $serverName packages:"
echoinfo "$serverPackages"
}
step_1_alias() { ALIAS="install"; }
step_1() {
exe apt update
@@ -50,8 +52,10 @@ siteDefaultIp4="server {
include ${snippetLetsencryptLoc};
}"
step_3_info() { echo "Installation of $phpName packages:"
echoinfo "$phpPackages"; }
step_3_info() {
echo "Installation of $phpName packages:"
echoinfo "$phpPackages"
}
step_3() {
exe apt install $phpPackages
endReturn -o $? "$phpName error during startup"

View File

@@ -13,14 +13,14 @@ CONFIG_FILE_NAME="${toolName}.cfg"
CONFIG_FILE_TEMPLATE="$WDIR/${CONFIG_FILE_NAME}.example"
#step_config() {
#echo "Called once before executing steps."
## e.g. to source a config file manually:
#. "$CONFIG_FILE"
## or to use sequencer api:
#initSeqConfig "$CONFIG_FILE_NAME" "$CONFIG_FILE_TEMPLATE"
#if [ $? -eq 0 ] ; then
# CONFIG=1
#fi
#echo "Called once before executing steps."
## e.g. to source a config file manually:
#. "$CONFIG_FILE"
## or to use sequencer api:
#initSeqConfig "$CONFIG_FILE_NAME" "$CONFIG_FILE_TEMPLATE"
#if [ $? -eq 0 ] ; then
# CONFIG=1
#fi
#}
step_1_info() { echo "Prepare installation of $toolName"; }