modernize multiple seqs and fix deprecated use of endCheckEmpty

This commit is contained in:
2022-12-12 16:42:25 +01:00
parent dbb8cac539
commit 7391de1ddd
18 changed files with 199 additions and 232 deletions

View File

@@ -1,26 +1,18 @@
#!/bin/bash
# Get script working directory
# (when called from a different directory)
WDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >>/dev/null 2>&1 && pwd)"
APTOPT=
CONFIG=0
SCRIPT_NAME=$(basename -- $0)
SCRIPT_NAME=${SCRIPT_NAME%%.*}
CONFIG_FILE_NAME="${SCRIPT_NAME}.cfg"
CONFIG_FILE_TEMPLATE="$WDIR/${CONFIG_FILE_NAME}.example"
sq_aptOpt=
seq_config() {
checkVpn
initSeqConfig -t "$CONFIG_FILE_NAME" "$CONFIG_FILE_TEMPLATE"
if [ $? -eq 0 ] ; then
CONFIG=1
else
if ! initSeqConfig -t "${seq_configName:?}" "${seq_configTemplate:?}" ; then
# End if no configuration file exists
dry || return -1
dry || return 1
fi
quiet && APTOPT="-y"
## Apt cmdline option to suppress user interaction
interactive || sq_aptOpt="-y"
return 0
}
@@ -227,7 +219,7 @@ step_11() {
exe curl -sL "$lidarrUrl" -o /tmp/Lidarr.tgz
endReturn -o "Download failed"
exe apt install $lidarrDeps $APTOPT
exe apt install $lidarrDeps ${sq_aptOpt}
exe tar xvzf /tmp/Lidarr.tgz -C "${DLD_DIR}/"
exe mv "${DLD_DIR}/Lidarr" "${DLD_DIR}/lidarr"
@@ -273,7 +265,7 @@ step_13() {
local bazarrDeps="python3-pip python3-distutils python3-venv ffmpeg"
#local bazarrDeps+=" libxml2-dev libxslt1-dev python3-libxml2 python3-lxml libatlas-base-dev"
exe apt install $bazarrDeps $APTOPT
exe apt install $bazarrDeps ${sq_aptOpt}
}
step_14_info() { echo "Install bazarr"; }
@@ -352,8 +344,8 @@ step_16() {
exe mkdir -p "$buildPath"
exe cd "$buildPath"
exe apt build-dep unrar-nonfree $APTOPT
exe apt source -b unrar-nonfree $APTOPT
exe apt build-dep unrar-nonfree ${sq_aptOpt}
exe apt source -b unrar-nonfree ${sq_aptOpt}
endReturn -o $? "unrar-nonfree build failed ($buildPath left untouched)"
exe dpkg -i unrar*.deb
endReturn -o $? "unrar-nonfree install failed ($buildPath left untouched)"
@@ -370,7 +362,7 @@ step_17() {
return 0
fi
exe apt update
exe apt install dante-server $APTOPT
exe apt install dante-server ${sq_aptOpt}
exe systemctl stop danted.service
exe systemctl disable danted.service
}
@@ -606,5 +598,7 @@ checkVpn() {
fi
}
# shellcheck disable=SC2034 # Appears unused
readonly sqr_minVersion=16
# shellcheck disable=SC1091 # Don't follow this source
. /usr/local/bin/sequencer.sh