From 445b955b787807ff7aaa26533bd929b02bfcd82d Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 22 May 2026 09:23:02 +0100 Subject: [PATCH] Bug 40901: (QA follow-up) Fix koha-disable --disable idempotency under set -e koha-plack, koha-zebra, koha-indexer and koha-es-indexer all return exit code 1 when asked to disable a service that is already disabled. koha-disable has set -e, so this propagated as a fatal error when koha-create called koha-disable on a freshly-created instance (where none of the per-service configs are enabled yet). Apply the same || true guard that koha-worker already had to the four unconditional --disable calls. The desired postcondition (service disabled) is achieved either way; the exit code from the sub-script is not meaningful here. Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim --- debian/scripts/koha-disable | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/debian/scripts/koha-disable b/debian/scripts/koha-disable index 1a14b1660a..64c9bb0074 100755 --- a/debian/scripts/koha-disable +++ b/debian/scripts/koha-disable @@ -70,19 +70,19 @@ do if is_plack_running $name; then koha-plack --stop $name fi - koha-plack --disable $name + koha-plack --disable $name || true if is_zebra_running $name; then koha-zebra --stop $name fi - koha-zebra --disable $name + koha-zebra --disable $name || true if is_indexer_running $name; then koha-indexer --stop $name fi - koha-indexer --disable $name + koha-indexer --disable $name || true if is_es_indexer_running $name; then koha-es-indexer --stop $name fi - koha-es-indexer --disable $name + koha-es-indexer --disable $name || true koha-worker --all-queues --stop $name || /bin/true koha-worker --all-queues --disable $name || /bin/true elif [ "$RET" = 2 ]; then