From e09e7152b6af1f2cb3d2e78eff317cdf77cbf5f2 Mon Sep 17 00:00:00 2001 From: Benjamin Rokseth Date: Mon, 8 Jun 2015 11:12:03 +0200 Subject: [PATCH] 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 Signed-off-by: Tomas Cohen Arazi Good catch Benjamin! It works as expected with the patch. --- debian/scripts/koha-functions.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debian/scripts/koha-functions.sh b/debian/scripts/koha-functions.sh index 34c6396c16..5ec633d103 100755 --- a/debian/scripts/koha-functions.sh +++ b/debian/scripts/koha-functions.sh @@ -100,6 +100,7 @@ is_zebra_running() local instancename=$1 if daemon --name="$instancename-koha-zebra" \ + --pidfiles="/var/run/koha/$instancename/" \ --user="$instancename-koha.$instancename-koha" \ --running ; then return 0 @@ -113,6 +114,7 @@ is_indexer_running() local instancename=$1 if daemon --name="$instancename-koha-indexer" \ + --pidfiles="/var/run/koha/$instancename/" \ --user="$instancename-koha.$instancename-koha" \ --running ; then return 0 -- 2.39.5