From ec10fdbb0e9eeba3d1942f798eb53e15348f2cc1 Mon Sep 17 00:00:00 2001 From: MickLesk <47820557+MickLesk@users.noreply.github.com> Date: Fri, 18 Sep 2026 08:09:40 +0200 Subject: [PATCH] sabnzbd: stop an optional extra from aborting the update par2cmdline-turbo is optional - the install asks 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. --- ct/sabnzbd.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ct/sabnzbd.sh b/ct/sabnzbd.sh index 52a4693ae..49d97d9a5 100644 --- a/ct/sabnzbd.sh +++ b/ct/sabnzbd.sh @@ -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