From 142ab7320fe4c2950cd8bf4fa43777cf10fc1519 Mon Sep 17 00:00:00 2001 From: Jake Bateman Date: Wed, 25 Mar 2026 14:39:29 +0000 Subject: [PATCH] Bug 40901: Add systemd try-restart to koha-systemd postinst MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In order for apt upgrades to trigger a service restart for all koha-systemd subservices and all instances, this adds a wildcard try-restart for those in addition to the daemon-reload. Only services which are already present and running will be restarted at postinst time 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 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/debian/koha-systemd.postinst b/debian/koha-systemd.postinst index 72efb7a6d9..d906630619 100644 --- a/debian/koha-systemd.postinst +++ b/debian/koha-systemd.postinst @@ -6,6 +6,14 @@ case "$1" in # 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 + esac #DEBHELPER#