Koha-clms/debian/scripts
Martin Renvoize ffe8b55b57
Bug 40901: (QA follow-up) Make koha-disable/koha-enable symmetric and fix koha-remove/koha-create
koha-disable had gained "koha-sip --disable" and an unconditional
"koha-plack --disable". On both backends those are not just systemd
bookkeeping: on SysV the former deletes the sip.enabled flag and the
latter comments the Plack includes out of the Apache vhost (which
koha-disable then restarts Apache to apply). koha-enable was unchanged,
so "koha-disable x && koha-enable x" left the instance on CGI with SIP
off. Go back to stopping the daemons only (the new Plack and ES indexer
stops are kept), and under systemd stop and disable the per-instance
koha@<inst>.target so the instance stays down across reboots while the
individual units keep their enablement. koha-enable re-enables and
starts that target, so an enabled instance comes back exactly as it
was.

koha-remove nested every --disable inside "if is_*_running", so a unit
that was enabled but stopped kept its symlink in
koha@<inst>.target.wants/ after the instance was gone, which is the
very thing the block below it says it prevents. Disable unconditionally.

koha-create aborted after the database and vhost existed if a
systemd-only --enable failed, because the helpers run under set -e;
guard them like the systemctl calls already were. It also only started
koha.target, which is a no-op when the target is already active, so
the new instance's units were not started; start koha@<name>.target
itself.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-09-29 09:02:36 +00:00
..
koha-create Bug 40901: (QA follow-up) Make koha-disable/koha-enable symmetric and fix koha-remove/koha-create 2026-09-29 09:02:36 +00:00
koha-create-dirs Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
koha-disable Bug 40901: (QA follow-up) Make koha-disable/koha-enable symmetric and fix koha-remove/koha-create 2026-09-29 09:02:36 +00:00
koha-dump Bug 41353: koha-dump failing on mysqldump PROCESS privileges 2026-04-23 09:24:58 -06:00
koha-dump-defaults Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
koha-elasticsearch Bug 36550: allow defaults to be defined for koha-elasticsearch 2026-04-15 11:37:17 -06:00
koha-email-disable Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
koha-email-enable Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
koha-enable Bug 40901: (QA follow-up) Make koha-disable/koha-enable symmetric and fix koha-remove/koha-create 2026-09-29 09:02:36 +00:00
koha-es-indexer Bug 40901: (testing follow-up) Added enable / disable to more helpers 2026-09-29 09:01:29 +00:00
koha-foreach Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
koha-functions.sh Bug 40901: (QA follow-up) Harden the service abstraction in koha-functions.sh 2026-09-29 09:02:35 +00:00
koha-generate-env Bug 40901: (QA follow-up) Make koha-common.service a dependency-free shim 2026-09-29 09:02:30 +00:00
koha-indexer Bug 40901: (follow-up) Fix critical bugs in systemd integration 2026-09-29 09:01:33 +00:00
koha-list Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
koha-mysql Revert "Bug 41099: Make `koha-mysql` disable SSL if required" 2025-10-31 11:26:10 -06:00
koha-mysqlcheck Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
koha-passwd Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
koha-plack Bug 40901: (QA follow-up) Harden the service abstraction in koha-functions.sh 2026-09-29 09:02:35 +00:00
koha-rebuild-zebra Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
koha-remove Bug 40901: (QA follow-up) Make koha-disable/koha-enable symmetric and fix koha-remove/koha-create 2026-09-29 09:02:36 +00:00
koha-reset-passwd Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
koha-restore Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
koha-run-backups Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
koha-shell Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
koha-sip Bug 40901: (follow-up) sip.enabled is an anti-pattern for systemd 2026-09-29 09:01:48 +00:00
koha-sitemap Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
koha-translate Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
koha-upgrade-schema Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
koha-upgrade-to-3.4 Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
koha-worker Bug 40901: (testing follow-up) Added enable / disable to more helpers 2026-09-29 09:01:29 +00:00
koha-z3950-responder Bug 40901: (follow-up) Fix incomplete systemd wiring in helpers 2026-09-29 09:01:34 +00:00
koha-zebra Bug 40901: (testing follow-up) Added enable / disable to more helpers 2026-09-29 09:01:29 +00:00