From 33bc1e7fdeb858ee0bfa08c2d0ab00732d591616 Mon Sep 17 00:00:00 2001 From: Mirko Tietgen Date: Sun, 28 Jun 2015 14:24:38 +0200 Subject: [PATCH] Bug 14466 -- is_zebra_running in koha-functions.sh is broken MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit is_zebra_running is broken, so koha-stop-zebra is broken too. daemon needs the --pidfiles if given at start, and the --running argumen has to be used before that. Beware that the path to koha-functions.sh in the koha- scripts is hardcoded for package installations (/usr/share…), so you need to change it to match koha-functions.sh in your dev environment to test this patch. Test plan: - Use koha-stop-zebra with an instance that has a running zebra. It will tell you that zebra was already stopped. - ps aux | grep zebra to see that is not true - Apply patch. Modify koha-stop-zebra to use /your/devpath/debian/scripts/koha-functions.sh - Use koha-stop-zebra. You will be told zebra is stopped now for your instance - ps aux | grep zebra to verify it is gone --- debian/scripts/koha-functions.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/debian/scripts/koha-functions.sh b/debian/scripts/koha-functions.sh index 8090fc5..d17a4c2d 100755 --- a/debian/scripts/koha-functions.sh +++ b/debian/scripts/koha-functions.sh @@ -99,9 +99,11 @@ is_zebra_running() { local instancename=$1 - if daemon --name="$instancename-koha-zebra" \ - --user="$instancename-koha.$instancename-koha" \ - --running ; then + if daemon \ + --running \ + --name="$instancename-koha-zebra" \ + --pidfiles="/var/run/koha/$instancename/" \ + --user="$instancename-koha.$instancename-koha" ; then return 0 else return 1 -- 1.7.10.4