mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-09-18 10:44:03 +00:00
sabnzbd: stop an optional extra from aborting the update
par2cmdline-turbo is optional - the install asks <y/N> for it - but its update ran first, unguarded, under catch_errors. When the release lookup failed the ERR trap took the whole run down and SABnzbd itself was never updated: No matching release found for animetosho/par2cmdline-turbo in line 2085: exit code 250 The asset it asks for exists and the release query resolves v1.5.0 against live data, so that lookup failed transiently. Whatever the reason, an optional component must not be able to block the main update. Move it behind the installation check so a missing /opt/sabnzbd is reported first, and warn instead of aborting when the lookup fails. The installed par2 binary simply stays as it is.
This commit is contained in:
@@ -27,14 +27,16 @@ function update_script() {
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if par2 --version | grep -q "par2cmdline-turbo"; then
|
||||
fetch_and_deploy_gh_release "par2cmdline-turbo" "animetosho/par2cmdline-turbo" "prebuild" "latest" "/usr/bin/" "*-linux-$(arch_resolve).zip"
|
||||
fi
|
||||
|
||||
if [[ ! -d /opt/sabnzbd ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if par2 --version 2>/dev/null | grep -q "par2cmdline-turbo"; then
|
||||
if ! fetch_and_deploy_gh_release "par2cmdline-turbo" "animetosho/par2cmdline-turbo" "prebuild" "latest" "/usr/bin/" "*-linux-$(arch_resolve).zip"; then
|
||||
msg_warn "Could not update par2cmdline-turbo, keeping the installed version"
|
||||
fi
|
||||
fi
|
||||
if check_for_gh_release "sabnzbd-org" "sabnzbd/sabnzbd"; then
|
||||
PYTHON_VERSION="3.13" setup_uv
|
||||
systemctl stop sabnzbd
|
||||
|
||||
Reference in New Issue
Block a user