From a5dfe07f012e31541134d92445cfca5d44d2f250 Mon Sep 17 00:00:00 2001 From: Alex Buckley Date: Wed, 17 Aug 2022 09:18:27 +0000 Subject: [PATCH] Bug 30684: (follow up) Split restart output across multiple lines Also, return 0 rather than return 1 in else clause of koha-zebra Sponsored-by: Catalyst IT, New Zealand --- debian/scripts/koha-indexer | 2 +- debian/scripts/koha-plack | 2 +- debian/scripts/koha-sip | 9 ++++----- debian/scripts/koha-worker | 2 +- debian/scripts/koha-z3950-responder | 2 +- debian/scripts/koha-zebra | 11 +++++------ 6 files changed, 13 insertions(+), 15 deletions(-) diff --git a/debian/scripts/koha-indexer b/debian/scripts/koha-indexer index 6a44b65b91c..3e3830ba1f5 100755 --- a/debian/scripts/koha-indexer +++ b/debian/scripts/koha-indexer @@ -134,7 +134,7 @@ restart_indexer() log_end_msg 1 fi else - log_daemon_msg "Indexer not running for $name." + echo "Indexer not running for $name." start_indexer $name fi } diff --git a/debian/scripts/koha-plack b/debian/scripts/koha-plack index 1709aac6e0e..b1a8fd189da 100755 --- a/debian/scripts/koha-plack +++ b/debian/scripts/koha-plack @@ -164,7 +164,7 @@ restart_plack() if is_plack_running ${instancename}; then stop_plack $instancename && start_plack $instancename else - log_daemon_msg "Plack not running for ${instancename}." + echo "Plack not running for ${instancename}." start_plack $instancename fi } diff --git a/debian/scripts/koha-sip b/debian/scripts/koha-sip index 3fde2a6806c..0aaf2473676 100755 --- a/debian/scripts/koha-sip +++ b/debian/scripts/koha-sip @@ -149,10 +149,10 @@ stop_sip() restart_sip() { local name=$1 + local noLF="-n" + [ "$verbose" != "no" ] && noLF="" if is_sip_running ${name}; then - local noLF="-n" - [ "$verbose" != "no" ] && noLF="" echo $noLF `stop_sip ${name}` MAX_ITERATION=10 @@ -167,12 +167,11 @@ restart_sip() echo $noLF `start_sip ${name}` else if [ "$verbose" != "no" ]; then - log_daemon_msg "Warning: SIP server not running for ${name}." - start_sip ${name} + echo $noLF "Warning: SIP server not running for ${name}." else - start_sip ${name} return 0 fi + start_sip ${name} fi } diff --git a/debian/scripts/koha-worker b/debian/scripts/koha-worker index 76863b6a26c..dd682717b10 100755 --- a/debian/scripts/koha-worker +++ b/debian/scripts/koha-worker @@ -144,7 +144,7 @@ restart_worker() log_end_msg 1 fi else - log_daemon_msg "Worker not running for $name ($queue)." + echo "Worker not running for $name ($queue)." start_worker $name $queue fi } diff --git a/debian/scripts/koha-z3950-responder b/debian/scripts/koha-z3950-responder index 56c63d10a6c..1398f0dc0ec 100755 --- a/debian/scripts/koha-z3950-responder +++ b/debian/scripts/koha-z3950-responder @@ -167,7 +167,7 @@ restart_z3950() log_end_msg 1 fi else - log_daemon_msg "Z39.50/SRU not running for ${instancename}." + echo "Z39.50/SRU not running for ${instancename}." start_z3950 $instancename fi } diff --git a/debian/scripts/koha-zebra b/debian/scripts/koha-zebra index b297611c754..1eff7676c68 100755 --- a/debian/scripts/koha-zebra +++ b/debian/scripts/koha-zebra @@ -138,20 +138,19 @@ stop_zebra() restart_zebra() { local name=$1 + local noLF="-n" + [ "$verbose" != "no" ] && noLF="" if is_zebra_running ${name}; then - local noLF="-n" - [ "$verbose" != "no" ] && noLF="" echo $noLF `stop_zebra ${name}` echo $noLF `start_zebra ${name}` else if [ "$verbose" != "no" ]; then - log_daemon_msg "Zebra not running for ${name}." - start_zebra ${name} + echo $noLF "Zebra not running for ${name}." else - start_zebra ${name} - return 1 + return 0 fi + start_zebra ${name} fi } -- 2.20.1