From 4acaa82fa101f892bab1e7e95db8d1ebcf286ea0 Mon Sep 17 00:00:00 2001 From: Larry Baerveldt Date: Tue, 3 Mar 2015 05:49:57 -0800 Subject: [PATCH] Bug 13784: koha-stop-zebra should also work for disabled instances Currently koha-stop-zebra will not stop zebra for disabled instances. It should work more like koha-stop-sip, which does work for disabled instances. Also, koha-stop-zebra is called by '/etc/init.d/koha-common stop' which clearly should also apply to disabled instances. To Test: 1) Disable a koha instance. 2) Run koha-stop-zebra INSTANCE. You should get message "Instance INSTANCE disabled. No action taken." 3) Apply patch, and copy patched file debian/scripts/koha-stop-zebra to package site over /usr/sbin/koha-stop-zebra. 4) Disable koha instance. 5) Run koha-stop-zebra INSTANCE. It should now stop zebra. http://bugs.koha-community.org/show_bug.cgi?id=13784 Signed-off-by: Mirko Tietgen Signed-off-by: Robin Sheat Signed-off-by: Tomas Cohen Arazi Signed-off-by: Mason James --- debian/scripts/koha-stop-zebra | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/debian/scripts/koha-stop-zebra b/debian/scripts/koha-stop-zebra index cf5084d9a0..10c8b78379 100755 --- a/debian/scripts/koha-stop-zebra +++ b/debian/scripts/koha-stop-zebra @@ -67,16 +67,12 @@ EOF for name in "$@" do if is_instance $name ; then - if is_enabled $name ; then - if is_zebra_running $name; then - if ! stop_zebra_instance $name; then - warn "Something went wrong stopping Zebra for $name." - fi - else - warn "Zebra already stopped for instance $name." + if is_zebra_running $name; then + if ! stop_zebra_instance $name; then + warn "Something went wrong stopping Zebra for $name." fi else - warn "Instance $name disabled. No action taken." + warn "Zebra already stopped for instance $name." fi else warn "Unknown instance $name." -- 2.39.5