Bug 14361: koha-restart-zebra fails and probably breaks upgrade
authorBenjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Mon, 8 Jun 2015 09:12:03 +0000 (11:12 +0200)
committerTomas Cohen Arazi <tomascohen@theke.io>
Wed, 26 Aug 2015 13:42:04 +0000 (10:42 -0300)
commite09e7152b6af1f2cb3d2e78eff317cdf77cbf5f2
treeb37ce81f947cb697fdeb5042e394f3d2e1304c32
parent34c11ee8eee5a547de3a83c2cba8e6eeedecfa01
Bug 14361: koha-restart-zebra fails and probably breaks upgrade

This patch fixes the koha-restart-zebra and koha-stop-zebra scripts
by adding pidfiles folder to the test is_zebra_running.
It also adds pidfiles to the test is_indexer_running so that
koha-rebuild-zebra will work properly.

Test plan:
1) check if zebrasrv is running, get pid of zebrasrv
   ps ax | grep zebrasrv
2) In my case, there was also a warning on the about.pl page on a fresh
   install: Error message from Zebra: 1011 (bad credentials)
3) try to restart zebra
   koha-restart-zebra instancename
   You will get a msg :
   Zebra does not appear to have been running for instancename
   Starting Zebra server for instancename
4) check again if zebrasrv is running
    ps ax | grep zebrasrv
   and see that pid has not changed, thus it is not restarted
5) Apply patch
6) repeat 4) and watch now how pid has changed
   If there was a warning on about.pl it should now be gone

Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Good catch Benjamin! It works as expected with the patch.
debian/scripts/koha-functions.sh