Add .editorconfig and correct indentation for many seqs
This commit is contained in:
6
.editorconfig
Normal file
6
.editorconfig
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
root = true
|
||||||
|
|
||||||
|
[*.{sh,cfg,example}]
|
||||||
|
charset = utf-8
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
@@ -50,10 +50,11 @@ step_2() {
|
|||||||
|
|
||||||
step_3_info() { echo "Add system user"; }
|
step_3_info() { echo "Add system user"; }
|
||||||
step_3() {
|
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"
|
echoinfo "Default port: 8989"
|
||||||
}
|
}
|
||||||
step_4() {
|
step_4() {
|
||||||
@@ -453,12 +454,12 @@ step_21() {
|
|||||||
[ ! -e "$pTar" ] && exe wget --content-disposition "$pUrl" -O "$pTar"
|
[ ! -e "$pTar" ] && exe wget --content-disposition "$pUrl" -O "$pTar"
|
||||||
|
|
||||||
if [ -e "$pInstallDir" ]; then
|
if [ -e "$pInstallDir" ]; then
|
||||||
prowlarrUpgrade=1
|
prowlarrUpgrade=1
|
||||||
echoseq " [I] Stopping prowlarr service"
|
echoseq " [I] Stopping prowlarr service"
|
||||||
echoseq " Service will not be started automatically after update"
|
echoseq " Service will not be started automatically after update"
|
||||||
exe service prowlarr stop
|
exe service prowlarr stop
|
||||||
echoseq " [I] Moving existing $pInstallDir as backup"
|
echoseq " [I] Moving existing $pInstallDir as backup"
|
||||||
exe mv "$pInstallDir" "${pInstallDir}_bu_"`date +%Y%m%d-%H%M%S`
|
exe mv "$pInstallDir" "${pInstallDir}_bu_"`date +%Y%m%d-%H%M%S`
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exe tar xvzf "$pTar" -C "${DLD_DIR}"
|
exe tar xvzf "$pTar" -C "${DLD_DIR}"
|
||||||
@@ -535,12 +536,12 @@ step_30() {
|
|||||||
[ ! -e "$readarrTar" ] && exe wget --content-disposition "$lUrl" -O "$readarrTar"
|
[ ! -e "$readarrTar" ] && exe wget --content-disposition "$lUrl" -O "$readarrTar"
|
||||||
|
|
||||||
if [ -e "$lInstallDir" ]; then
|
if [ -e "$lInstallDir" ]; then
|
||||||
readarrUpgrade=1
|
readarrUpgrade=1
|
||||||
echoseq " [I] Stopping readarr service"
|
echoseq " [I] Stopping readarr service"
|
||||||
echoseq " Service will not be started automatically after update"
|
echoseq " Service will not be started automatically after update"
|
||||||
exe service readarr stop
|
exe service readarr stop
|
||||||
echoseq " [I] Moving existing $lInstallDir as backup"
|
echoseq " [I] Moving existing $lInstallDir as backup"
|
||||||
exe mv "$lInstallDir" "${lInstallDir}_bu_"`date +%Y%m%d-%H%M%S`
|
exe mv "$lInstallDir" "${lInstallDir}_bu_"`date +%Y%m%d-%H%M%S`
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exe tar xvf "$readarrTar" -C "${DLD_DIR}"
|
exe tar xvf "$readarrTar" -C "${DLD_DIR}"
|
||||||
|
@@ -26,7 +26,7 @@ step_1() {
|
|||||||
exe apt install gnupg2 git lsb-release ssl-cert ca-certificates apt-transport-https \
|
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 \
|
tree locate software-properties-common dirmngr screen htop nano net-tools zip unzip \
|
||||||
curl ffmpeg ghostscript libfile-fcntllock-perl curl socat
|
curl ffmpeg ghostscript libfile-fcntllock-perl curl socat
|
||||||
}
|
}
|
||||||
|
|
||||||
step_2_info() { echo "Add universe and official nginx apt repositories"; }
|
step_2_info() { echo "Add universe and official nginx apt repositories"; }
|
||||||
step_2() {
|
step_2() {
|
||||||
|
@@ -230,7 +230,7 @@ step_21() {
|
|||||||
"mysql_virtual_alias_maps"\
|
"mysql_virtual_alias_maps"\
|
||||||
"mysql_virtual_alias_domain_maps"\
|
"mysql_virtual_alias_domain_maps"\
|
||||||
"mysql_virtual_alias_domain_catchall_maps"\
|
"mysql_virtual_alias_domain_catchall_maps"\
|
||||||
)
|
)
|
||||||
|
|
||||||
for mtaFile in ${mtaMysqlFiles[@]}
|
for mtaFile in ${mtaMysqlFiles[@]}
|
||||||
do
|
do
|
||||||
|
@@ -154,12 +154,13 @@ SyslogIdentifier=synapse
|
|||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target"
|
WantedBy=multi-user.target"
|
||||||
|
|
||||||
step_10_info() { echo -n "Upgrade $toolName installation"
|
step_10_info() {
|
||||||
if [ $CONTEXT_HELP -eq 0 ] ; then
|
echo -n "Upgrade $toolName installation"
|
||||||
echo " at $MATRIX_HOME"
|
if [ $CONTEXT_HELP -eq 0 ] ; then
|
||||||
else
|
echo " at $MATRIX_HOME"
|
||||||
echo
|
else
|
||||||
fi
|
echo
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
step_10_alias() { ALIAS="upgrade"; }
|
step_10_alias() { ALIAS="upgrade"; }
|
||||||
step_10() {
|
step_10() {
|
||||||
@@ -193,7 +194,7 @@ step_14() {
|
|||||||
local synapseIP=localhost
|
local synapseIP=localhost
|
||||||
shift
|
shift
|
||||||
if [ ! -z $1 ]; then
|
if [ ! -z $1 ]; then
|
||||||
synapseIP="$1"
|
synapseIP="$1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local apiCall="http://${synapseIP}:8008/_synapse/admin/v1/server_version"
|
local apiCall="http://${synapseIP}:8008/_synapse/admin/v1/server_version"
|
||||||
@@ -229,7 +230,7 @@ step_16() {
|
|||||||
done
|
done
|
||||||
|
|
||||||
if [ ! -z $1 ]; then
|
if [ ! -z $1 ]; then
|
||||||
synapseIP="$1"
|
synapseIP="$1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local apiCall="http://${synapseIP}:8008/_synapse/admin/v2/users"
|
local apiCall="http://${synapseIP}:8008/_synapse/admin/v2/users"
|
||||||
@@ -299,7 +300,7 @@ step_22() {
|
|||||||
done
|
done
|
||||||
|
|
||||||
if [ ! -z $1 ]; then
|
if [ ! -z $1 ]; then
|
||||||
synapseIP="$1"
|
synapseIP="$1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local apiCall="http://${synapseIP}:8008/_synapse/admin/v1/rooms"
|
local apiCall="http://${synapseIP}:8008/_synapse/admin/v1/rooms"
|
||||||
@@ -340,7 +341,7 @@ step_24() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -z $1 ]; then
|
if [ ! -z $1 ]; then
|
||||||
synapseIP="$1"
|
synapseIP="$1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local apiCall="http://${synapseIP}:8008/_synapse/admin/v1/rooms/$roomId/members"
|
local apiCall="http://${synapseIP}:8008/_synapse/admin/v1/rooms/$roomId/members"
|
||||||
@@ -363,7 +364,7 @@ step_26() {
|
|||||||
local synapseIP=localhost
|
local synapseIP=localhost
|
||||||
|
|
||||||
if [ ! -z $1 ]; then
|
if [ ! -z $1 ]; then
|
||||||
synapseIP="$1"
|
synapseIP="$1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local apiCall="http://${synapseIP}:8008/_synapse/admin/v1/rooms"
|
local apiCall="http://${synapseIP}:8008/_synapse/admin/v1/rooms"
|
||||||
|
@@ -128,11 +128,11 @@ motioneyeMediaDir="/var/lib/motioneye"
|
|||||||
|
|
||||||
step_8_info() { echo "Create $toolName service"; }
|
step_8_info() { echo "Create $toolName service"; }
|
||||||
step_8() {
|
step_8() {
|
||||||
exe cp "$motioneyeServiceSource" "$motioneyeServiceTarget"
|
exe cp "$motioneyeServiceSource" "$motioneyeServiceTarget"
|
||||||
endReturn -o $? "Creating service failed"
|
endReturn -o $? "Creating service failed"
|
||||||
exe systemctl daemon-reload
|
exe systemctl daemon-reload
|
||||||
exe systemctl enable motioneye
|
exe systemctl enable motioneye
|
||||||
exe systemctl start motioneye
|
exe systemctl start motioneye
|
||||||
}
|
}
|
||||||
motioneyeServiceSource="/usr/local/share/motioneye/extra/motioneye.systemd-unit-local"
|
motioneyeServiceSource="/usr/local/share/motioneye/extra/motioneye.systemd-unit-local"
|
||||||
motioneyeServiceTarget="/etc/systemd/system/motioneye.service"
|
motioneyeServiceTarget="/etc/systemd/system/motioneye.service"
|
||||||
|
@@ -84,7 +84,7 @@ step_10() {
|
|||||||
--remote|-r)
|
--remote|-r)
|
||||||
dbRemote="$2"
|
dbRemote="$2"
|
||||||
shift 2 ;;
|
shift 2 ;;
|
||||||
*)
|
*)
|
||||||
break ;;
|
break ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
@@ -136,7 +136,7 @@ step_11() {
|
|||||||
--remote|-r)
|
--remote|-r)
|
||||||
dbRemote="$2"
|
dbRemote="$2"
|
||||||
shift 2 ;;
|
shift 2 ;;
|
||||||
*)
|
*)
|
||||||
break ;;
|
break ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
@@ -188,7 +188,7 @@ step_12() {
|
|||||||
--remote|-r)
|
--remote|-r)
|
||||||
dbRemote="$2"
|
dbRemote="$2"
|
||||||
shift 2 ;;
|
shift 2 ;;
|
||||||
*)
|
*)
|
||||||
break ;;
|
break ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
@@ -219,7 +219,7 @@ step_14() {
|
|||||||
--remote|-r)
|
--remote|-r)
|
||||||
dbRemote="$2"
|
dbRemote="$2"
|
||||||
shift 2 ;;
|
shift 2 ;;
|
||||||
*)
|
*)
|
||||||
break ;;
|
break ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
@@ -264,7 +264,7 @@ step_34() {
|
|||||||
--remote|-r)
|
--remote|-r)
|
||||||
dbRemote="$2"
|
dbRemote="$2"
|
||||||
shift 2 ;;
|
shift 2 ;;
|
||||||
*)
|
*)
|
||||||
break ;;
|
break ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
@@ -119,10 +119,10 @@ step_5() {
|
|||||||
options="-e JWT_ENABLED=true -e JWT_SECRET="
|
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.
|
# 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 \
|
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/logs:/var/log/onlyoffice \
|
||||||
-v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data \
|
-v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data \
|
||||||
-v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice \
|
-v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice \
|
||||||
-v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql "${dockerImageName}"
|
-v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql "${dockerImageName}"
|
||||||
else
|
else
|
||||||
echoerr " [W] Running $toolName without JWT (JSON Web Tokens)"
|
echoerr " [W] Running $toolName without JWT (JSON Web Tokens)"
|
||||||
exe docker run -i -t -d -p ${onlyOfficePort}:80 --restart=always "${dockerImageName}"
|
exe docker run -i -t -d -p ${onlyOfficePort}:80 --restart=always "${dockerImageName}"
|
||||||
|
@@ -49,7 +49,7 @@ postCron="# -q quiet -N timestamping (overwrite existing file) -O target file
|
|||||||
step_3_info() { echo "Configuration notes"; }
|
step_3_info() { echo "Configuration notes"; }
|
||||||
step_3_alias() { ALIAS="notes"; }
|
step_3_alias() { ALIAS="notes"; }
|
||||||
step_3() {
|
step_3() {
|
||||||
echo "$toolNotes"
|
echo "$toolNotes"
|
||||||
}
|
}
|
||||||
toolNotes="
|
toolNotes="
|
||||||
# Reduce default message delay to 1 minute
|
# Reduce default message delay to 1 minute
|
||||||
|
@@ -82,8 +82,10 @@ listen 80 default_server;
|
|||||||
include ${snippetLetsencryptLoc};
|
include ${snippetLetsencryptLoc};
|
||||||
}"
|
}"
|
||||||
|
|
||||||
step_4_info() { echo "Installation of $phpName packages:"
|
step_4_info() {
|
||||||
echoinfo "$phpPackages"; }
|
echo "Installation of $phpName packages:"
|
||||||
|
echoinfo "$phpPackages"
|
||||||
|
}
|
||||||
step_4_alias() { ALIAS="php"; }
|
step_4_alias() { ALIAS="php"; }
|
||||||
step_4() {
|
step_4() {
|
||||||
exe apt install $(eval echo $phpPackages) $aptOpt
|
exe apt install $(eval echo $phpPackages) $aptOpt
|
||||||
|
@@ -6,8 +6,10 @@ phpVersion="7.3"
|
|||||||
phpName="php$phpVersion"
|
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"
|
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:"
|
step_1_info() {
|
||||||
echoinfo "$serverPackages"; }
|
echo "Installation of $serverName packages:"
|
||||||
|
echoinfo "$serverPackages"
|
||||||
|
}
|
||||||
step_1_alias() { ALIAS="install"; }
|
step_1_alias() { ALIAS="install"; }
|
||||||
step_1() {
|
step_1() {
|
||||||
exe apt update
|
exe apt update
|
||||||
@@ -50,8 +52,10 @@ siteDefaultIp4="server {
|
|||||||
include ${snippetLetsencryptLoc};
|
include ${snippetLetsencryptLoc};
|
||||||
}"
|
}"
|
||||||
|
|
||||||
step_3_info() { echo "Installation of $phpName packages:"
|
step_3_info() {
|
||||||
echoinfo "$phpPackages"; }
|
echo "Installation of $phpName packages:"
|
||||||
|
echoinfo "$phpPackages"
|
||||||
|
}
|
||||||
step_3() {
|
step_3() {
|
||||||
exe apt install $phpPackages
|
exe apt install $phpPackages
|
||||||
endReturn -o $? "$phpName error during startup"
|
endReturn -o $? "$phpName error during startup"
|
||||||
|
@@ -13,14 +13,14 @@ CONFIG_FILE_NAME="${toolName}.cfg"
|
|||||||
CONFIG_FILE_TEMPLATE="$WDIR/${CONFIG_FILE_NAME}.example"
|
CONFIG_FILE_TEMPLATE="$WDIR/${CONFIG_FILE_NAME}.example"
|
||||||
|
|
||||||
#step_config() {
|
#step_config() {
|
||||||
#echo "Called once before executing steps."
|
#echo "Called once before executing steps."
|
||||||
## e.g. to source a config file manually:
|
## e.g. to source a config file manually:
|
||||||
#. "$CONFIG_FILE"
|
#. "$CONFIG_FILE"
|
||||||
## or to use sequencer api:
|
## or to use sequencer api:
|
||||||
#initSeqConfig "$CONFIG_FILE_NAME" "$CONFIG_FILE_TEMPLATE"
|
#initSeqConfig "$CONFIG_FILE_NAME" "$CONFIG_FILE_TEMPLATE"
|
||||||
#if [ $? -eq 0 ] ; then
|
#if [ $? -eq 0 ] ; then
|
||||||
# CONFIG=1
|
# CONFIG=1
|
||||||
#fi
|
#fi
|
||||||
#}
|
#}
|
||||||
|
|
||||||
step_1_info() { echo "Prepare installation of $toolName"; }
|
step_1_info() { echo "Prepare installation of $toolName"; }
|
||||||
|
Reference in New Issue
Block a user