From 3eb65c1041a3dcef3b7aaf53d3670c55d1a1e1f1 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 22 May 2026 07:29:55 +0100 Subject: [PATCH] Bug 40901: (QA follow-up) Drop redundant ExecStart systemctl call in koha-common.service MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit koha-common.service already declares BindsTo=koha.target and After=koha.target. BindsTo= implies Requires=, so systemd will start koha.target automatically when this compat unit starts and will wait for it to be active before proceeding. The explicit ExecStart=/bin/systemctl start koha.target was therefore redundant, and calling systemctl from within a service body is an anti-pattern (it makes an extra D-Bus round-trip back to PID 1 and can deadlock in edge cases during early boot). Replace with /bin/true so the oneshot succeeds immediately after the ExecStartPre ES-indexer discovery step. ExecStop is kept as-is because there is no declarative equivalent for "stopping this unit should stop koha.target" — BindsTo= only propagates stops in the other direction. Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim --- debian/systemd/koha-common.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/systemd/koha-common.service b/debian/systemd/koha-common.service index af29d0e18e..5387ee3ae5 100644 --- a/debian/systemd/koha-common.service +++ b/debian/systemd/koha-common.service @@ -8,7 +8,7 @@ After=koha.target Type=oneshot RemainAfterExit=yes ExecStartPre=+/bin/sh -c 'for i in $(koha-list --enabled --elasticsearch 2>/dev/null); do systemctl enable --now "koha-es-indexer@$i.service" 2>/dev/null || true; done' -ExecStart=/bin/systemctl start koha.target +ExecStart=/bin/true ExecStop=/bin/systemctl stop koha.target [Install]