Used sequpgrade.sh to upgrade existing seqs

This commit is contained in:
2022-05-29 20:58:23 +02:00
parent 10ee4198f0
commit 6214493c18
57 changed files with 802 additions and 806 deletions

View File

@@ -10,7 +10,7 @@ SCRIPT_NAME=${SCRIPT_NAME%%.*}
CONFIG_FILE_NAME="${SCRIPT_NAME}.cfg"
CONFIG_FILE_TEMPLATE="$WDIR/${CONFIG_FILE_NAME}.example"
step_config() {
seq_config() {
checkVpn
initSeqConfig -t "$CONFIG_FILE_NAME" "$CONFIG_FILE_TEMPLATE"
@@ -18,14 +18,14 @@ step_config() {
CONFIG=1
else
# End if no configuration file exists
[ $DRY -eq 0 ] && return -1
dry || return -1
fi
[ $QUIET -ne 0 ] && APTOPT="-y"
quiet && APTOPT="-y"
return 0
}
step_1_info() { echo "Install mono"; }
step_1_alias() { ALIAS="install"; }
step_1_alias() { echo "install"; }
step_1() {
exe apt install apt-transport-https dirmngr gnupg ca-certificates
exe apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
@@ -319,17 +319,17 @@ WantedBy=multi-user.target
Alias=bazarr.service"
step_15_info() { echo "Create ufw rules for default ports"; }
step_15_alias() { ALIAS="ufw"; }
step_15_alias() { echo "ufw"; }
step_15() {
exe ufw allow in on eth0 to any port 6789 proto tcp comment "NZBGet"
exe ufw allow in on eth0 to any port 9117 proto tcp comment "Jackett. Rules for Sonarr und Radarr in /etc/ufw/rules.before"
outColor red
color red
echo
echo "[W] Add the following lines before \"# drop INVALID packets\""
echo " [/etc/ufw/before.rules]"
echo
outColor green
color green
echo "# Allow all packages to sonarr and radarr"
echo "# ufw thinks that nzb360 sends messages after socket is closed"
echo "-A ufw-before-input -i eth0 -p tcp --dport 7878 -j ACCEPT"
@@ -362,11 +362,11 @@ step_16() {
}
step_17_info() { echo "Install danted socks proxy"; }
step_17_alias() { ALIAS="danted"; }
step_17_alias() { echo "danted"; }
step_17() {
systemctl status danted.service >>/dev/null 2>&1
if [ $? -eq 0 ]; then
echoseq " [I] Danted already installed"
info "Danted already installed"
return 0
fi
exe apt update
@@ -419,7 +419,7 @@ DANTED_EOF
}
step_19_info() { echo "Disable apt-daily activities"; }
step_19_alias() { ALIAS="aptdaily"; }
step_19_alias() { echo "aptdaily"; }
step_19() {
exe /usr/bin/systemctl stop apt-daily-upgrade.timer
exe /usr/bin/systemctl stop apt-daily.timer
@@ -430,22 +430,18 @@ step_19() {
}
step_21_info() {
local pInstallDir="${DLD_DIR}/prowlarr"
case $CONTEXT_HELP in
0)
if [ -e "$pInstallDir" ]; then
echo -n "Upgrade "
else
echo -n "Install "
fi
;;
*)
echo -n "Install/Update ";;
esac
local pInstallDir="${DLD_DIR:-}/prowlarr"
if contextHelp ; then
echo -n "Install/Update "
elif [ -e "$pInstallDir" ]; then
echo -n "Upgrade "
else
echo -n "Install "
fi
echo "prowlarr for arm64"
echoinfo "Default port: 9696"
}
step_21_alias() { ALIAS="prowlarr"; }
step_21_alias() { echo "prowlarr"; }
step_21() {
# local pDownDir="/tmp"
local pInstallDir="${DLD_DIR}/prowlarr"
@@ -455,10 +451,10 @@ step_21() {
if [ -e "$pInstallDir" ]; then
prowlarrUpgrade=1
echoseq " [I] Stopping prowlarr service"
echoseq " Service will not be started automatically after update"
info "Stopping prowlarr service"
info " Service will not be started automatically after update"
exe service prowlarr stop
echoseq " [I] Moving existing $pInstallDir as backup"
info "Moving existing $pInstallDir as backup"
exe mv "$pInstallDir" "${pInstallDir}_bu_"`date +%Y%m%d-%H%M%S`
fi
@@ -470,12 +466,12 @@ pTar="/tmp/Prowlarr.tgz"
prowlarrUpgrade=0
step_22_info() { echo "Clean prowlarr download"; }
step_22_alias() { ALIAS="prowlarrclean"; }
step_22_alias() { echo "prowlarrclean"; }
step_22() {
exe rm -rf "$pTar"
if [ $prowlarrUpgrade -ne 0 ]; then
echoseq " [I] Stopping sequence here."
echoseq " Following steps only exected for fresh installation."
info "Stopping sequence here."
info " Following steps only exected for fresh installation."
exit 0
fi
}
@@ -512,22 +508,18 @@ step_24() {
}
step_30_info() {
local pInstallDir="${DLD_DIR}/readarr"
case $CONTEXT_HELP in
0)
if [ -e "$pInstallDir" ]; then
echo -n "Upgrade "
else
echo -n "Install "
fi
;;
*)
echo -n "Install/Update ";;
esac
local pInstallDir="${DLD_DIR:-}/readarr"
if contextHelp ; then
echo -n "Install/Update "
elif [ -e "$pInstallDir" ]; then
echo -n "Upgrade "
else
echo -n "Install "
fi
echo "readarr for arm64"
echoinfo "Default port: 8787"
}
step_30_alias() { ALIAS="readarr"; }
step_30_alias() { echo "readarr"; }
step_30() {
# local pDownDir="/tmp"
local lInstallDir="${DLD_DIR}/readarr"
@@ -537,10 +529,10 @@ step_30() {
if [ -e "$lInstallDir" ]; then
readarrUpgrade=1
echoseq " [I] Stopping readarr service"
echoseq " Service will not be started automatically after update"
info "Stopping readarr service"
info " Service will not be started automatically after update"
exe service readarr stop
echoseq " [I] Moving existing $lInstallDir as backup"
info "Moving existing $lInstallDir as backup"
exe mv "$lInstallDir" "${lInstallDir}_bu_"`date +%Y%m%d-%H%M%S`
fi
@@ -552,12 +544,12 @@ readarrTar="/tmp/Readarr.tar.gz"
readarrUpgrade=0
step_31_info() { echo "Clean readarr download"; }
step_31_alias() { ALIAS="readarrclean"; }
step_31_alias() { echo "readarrclean"; }
step_31() {
exe rm -rf "$readarrTar"
if [ $readarrUpgrade -ne 0 ]; then
echoseq " [I] Stopping sequence here."
echoseq " Following steps only exected for fresh installation."
info "Stopping sequence here."
info " Following steps only exected for fresh installation."
exit 0
fi
}
@@ -595,7 +587,7 @@ step_33() {
}
step_50_info() { echo "Upgrade bazarr"; }
step_50_alias() { ALIAS="upgradebazarr"; }
step_50_alias() { echo "upgradebazarr"; }
step_50() {
local bazarrServiceLoc="/etc/systemd/system/bazarr.service"
local lService=`eval "echo \"$bazarrService\""`
@@ -610,8 +602,8 @@ step_50() {
checkVpn() {
ip -br a | grep tun >>/dev/null 2>&1
[ $? -eq 0 ] && echoseq " [W] A VPN connection is possibly active. Consider deactivating it befor any apt operation."
[ $? -eq 0 ] && warning "A VPN connection is possibly active. Consider deactivating it befor any apt operation."
}
VERSION_SEQREV=13
readonly sqr_minVersion=16
. /usr/local/bin/sequencer.sh