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 <martin.renvoize@openfifth.co.uk> Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
This commit is contained in:
parent
6b54ee976b
commit
445b955b78
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue