Bug 17467: Restart failing, missing instance parameter
authorMark Tompsett <mtompset@hotmail.com>
Sun, 1 Jan 2017 07:17:55 +0000 (07:17 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 27 Oct 2017 17:10:31 +0000 (14:10 -0300)
This follow up should make it work. Perhaps there is a more
elegant way, but wanted to generate something that works.

Before this patch, the --restart stops Zebra, but does not
restart it. After, it does restart.

Before this patch, the --status gives nasty long help.
After this patch, reasonable output.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

debian/scripts/koha-zebra

index aa065e6..e69fc7f 100755 (executable)
@@ -134,9 +134,10 @@ restart_zebra()
     local name=$1
 
     if is_zebra_running ${name}; then
-
-        stop_zebra ${name} && \
-        start_zebra ${name}
+        local noLF="-n"
+        [ "$verbose" != "no" ] && noLF=""
+        echo $noLF `stop_zebra ${name}`
+        echo $noLF `start_zebra ${name}`
     else
         if [ "$verbose" != "no" ]; then
             log_daemon_msg "Error: Zebra not running for ${name}"
@@ -149,7 +150,7 @@ zebra_status()
 {
     local name=$1
 
-    if is_zebra_running; then
+    if is_zebra_running ${name}; then
         log_daemon_msg "Zebra running for ${name}"
         log_end_msg 0
     else