From d67d319b8984ea468afc4b2e82476c3c345f281c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Cohen=20Arazi?= Date: Wed, 29 Apr 2026 10:32:31 -0300 Subject: [PATCH] Bug 40901: (follow-up) Preserve 'service koha-common' UX with systemd Adds PartOf=koha.target to koha@.target so that stopping or restarting the global target propagates to all instance targets and their services. Ships a koha-common.service oneshot unit that delegates to koha.target, so 'systemctl restart koha-common' works as the drop-in replacement for the old 'service koha-common restart'. Signed-off-by: Kyle M Hall Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim --- debian/systemd/koha-common.service | 14 ++++++++++++++ debian/systemd/koha@.target | 1 + 2 files changed, 15 insertions(+) create mode 100644 debian/systemd/koha-common.service diff --git a/debian/systemd/koha-common.service b/debian/systemd/koha-common.service new file mode 100644 index 0000000000..8f49282b95 --- /dev/null +++ b/debian/systemd/koha-common.service @@ -0,0 +1,14 @@ +[Unit] +Description=Koha ILS - All instances (compat) +Documentation=man:koha-common(8) +BindsTo=koha.target +After=koha.target + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/bin/systemctl start koha.target +ExecStop=/bin/systemctl stop koha.target + +[Install] +WantedBy=multi-user.target diff --git a/debian/systemd/koha@.target b/debian/systemd/koha@.target index 4fc988e0d6..3348d5818a 100644 --- a/debian/systemd/koha@.target +++ b/debian/systemd/koha@.target @@ -1,6 +1,7 @@ [Unit] Description=Koha ILS instance %i After=network.target memcached.service mysql.service +PartOf=koha.target StopWhenUnneeded=yes [Install]