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

@@ -59,7 +59,7 @@ step_4() {
exe systemctl disable sonarr
}
step_5_info() {
step_5_info() {
echo "Install radarr for arm64"
echoinfo "Default port: 7878"
}
@@ -209,7 +209,7 @@ WantedBy=multi-user.target sonarr.service radarr.service
Alias=nzbget.service
#RequiredBy=sonarr.service radarr.service"
step_11_info() {
step_11_info() {
echo "Install lidarr for arm64"
echoinfo "Default port: 8686"
}
@@ -278,7 +278,7 @@ step_14() {
local bazarrGitUrl="https://github.com/morpheus65535/bazarr.git"
exe python3 -m venv "$bazarrVenv"
endReturn -o $? "Creating virtual environment failed"
endReturn "Creating virtual environment failed"
exe git clone $bazarrGitUrl "$bazarrDir"
exe chown -R $DLD_USER: "$bazarrVenv"
@@ -340,15 +340,15 @@ step_16() {
local buildPath="/tmp/unrarbuild"
cat /etc/apt/sources.list | grep -E "^deb-src" >>/dev/null 2>&1
endReturn -o $? "No deb-src entry found in /etc/apt/sources.list"
endReturn "No deb-src entry found in /etc/apt/sources.list"
exe mkdir -p "$buildPath"
exe cd "$buildPath"
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)"
endReturn "unrar-nonfree build failed ($buildPath left untouched)"
exe dpkg -i unrar*.deb
endReturn -o $? "unrar-nonfree install failed ($buildPath left untouched)"
endReturn "unrar-nonfree install failed ($buildPath left untouched)"
exe rm -rf "$buildPath"
}
@@ -448,7 +448,7 @@ step_21() {
exe service prowlarr stop
info "Moving existing $pInstallDir as backup"
exe mv "$pInstallDir" "${pInstallDir}_bu_"`date +%Y%m%d-%H%M%S`
fi
fi
exe tar xvzf "$pTar" -C "${DLD_DIR}"
exe mv "${DLD_DIR}/Prowlarr" "${DLD_DIR}/prowlarr"
@@ -465,7 +465,7 @@ step_22() {
info "Stopping sequence here."
info " Following steps only exected for fresh installation."
exit 0
fi
fi
}
step_23_info() { echo "Create prowlarr service"; }
@@ -526,7 +526,7 @@ step_30() {
exe service readarr stop
info "Moving existing $lInstallDir as backup"
exe mv "$lInstallDir" "${lInstallDir}_bu_"`date +%Y%m%d-%H%M%S`
fi
fi
exe tar xvf "$readarrTar" -C "${DLD_DIR}"
exe mv "${DLD_DIR}/Readarr" "${lInstallDir}"