Bug 23700: Fix output of koha-plack --restart
authorMagnus Enger <magnus@libriotech.no>
Mon, 30 Sep 2019 13:01:35 +0000 (15:01 +0200)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 21 Oct 2019 08:46:40 +0000 (09:46 +0100)
To test:
- Run "sudo koha-plack restart kohadev" and verify the output is
  out of line.
- Apply the patch
- If you are on e.g. kohadevbox you need to copy koha-plack to
  /usr/sbin/ thus:
  sudo cp debian/scripts/koha-plack /usr/sbin/koha-plack
- Run "sudo koha-plack restart kohadev" again and check that you
  get two lines of output, nicely aligned with the "OK" inside the
  square brackets.

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

debian/scripts/koha-plack

index b14bac5..e541d44 100755 (executable)
@@ -162,14 +162,7 @@ restart_plack()
     local PIDFILE="/var/run/koha/${instancename}/plack.pid"
 
     if is_plack_running ${instancename}; then
-
-        log_daemon_msg "Restarting Plack daemon for ${instancename}"
-
-        if stop_plack $instancename && start_plack $instancename; then
-            log_end_msg 0
-        else
-            log_end_msg 1
-        fi
+        stop_plack $instancename && start_plack $instancename
     else
         log_daemon_msg "Error: Plack not running for ${instancename}"
         log_end_msg 1