From 630b1c377d0cff2dc64677a4a1ea146ba589c84c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Cohen=20Arazi?= Date: Mon, 27 Apr 2026 12:04:52 -0300 Subject: [PATCH] Bug 40901: (follow-up) Fix critical bugs in systemd integration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - koha-sip: disable_sip() was calling 'enable' instead of 'disable' - koha-indexer: enable/disable dispatch was calling start/stop functions - koha-systemd.postinst: upgrade try-restart was outside the case block Signed-off-by: Tomás Cohen Arazi Signed-off-by: Kyle M Hall Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim --- debian/koha-systemd.postinst | 15 +++++++-------- debian/scripts/koha-indexer | 4 ++-- debian/scripts/koha-sip | 2 +- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/debian/koha-systemd.postinst b/debian/koha-systemd.postinst index d906630619..010ec5d5d7 100644 --- a/debian/koha-systemd.postinst +++ b/debian/koha-systemd.postinst @@ -5,15 +5,14 @@ case "$1" in configure) # Reload systemd daemon systemctl daemon-reload || true + + # on upgrade, restart running Koha services so they pick up new code/unit files + if [ -n "$2" ]; then + deb-systemd-invoke try-restart \ + 'koha-*@*.service' \ + >/dev/null || true + fi ;; - - # on upgrade, restart running Koha services so they pick up new code/unit files - if [ -n "$2" ]; then - deb-systemd-invoke try-restart \ - 'koha-*@*.service' \ - >/dev/null || true - fi - esac #DEBHELPER# diff --git a/debian/scripts/koha-indexer b/debian/scripts/koha-indexer index 5997b0f3f9..2540fc32f7 100755 --- a/debian/scripts/koha-indexer +++ b/debian/scripts/koha-indexer @@ -203,10 +203,10 @@ if [ $# -gt 0 ]; then restart_indexer $name ;; "enable") - start_indexer $name + enable_indexer $name ;; "disable") - stop_indexer $name + disable_indexer $name ;; "status") indexer_status $name diff --git a/debian/scripts/koha-sip b/debian/scripts/koha-sip index a4ca238c4f..7a9e2559e5 100755 --- a/debian/scripts/koha-sip +++ b/debian/scripts/koha-sip @@ -128,7 +128,7 @@ disable_sip() local libdir=/var/lib/koha/${name} if [ "$(koha_init_backend)" = "systemd" ]; then - koha_service_ctl enable sip "$name" + koha_service_ctl disable sip "$name" fi if is_sip_enabled ${name}; then