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 <mirko@abunchofthings.net>
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
Larry Baerveldt 2015-03-03 05:49:57 -08:00 committed by Tomas Cohen Arazi
parent f71f1ba6e2
commit 77809ccd32

View file

@ -67,7 +67,6 @@ EOF
for name in "$@" for name in "$@"
do do
if is_instance $name ; then if is_instance $name ; then
if is_enabled $name ; then
if is_zebra_running $name; then if is_zebra_running $name; then
if ! stop_zebra_instance $name; then if ! stop_zebra_instance $name; then
warn "Something went wrong stopping Zebra for $name." warn "Something went wrong stopping Zebra for $name."
@ -75,9 +74,6 @@ do
else else
warn "Zebra already stopped for instance $name." warn "Zebra already stopped for instance $name."
fi fi
else
warn "Instance $name disabled. No action taken."
fi
else else
warn "Unknown instance $name." warn "Unknown instance $name."
fi fi