From 851ce55495f999cc560240cbe7ef9406d8bed023 Mon Sep 17 00:00:00 2001
From: Tomas Cohen Arazi <tomascohen@theke.io>
Date: Thu, 13 Aug 2015 14:54:58 -0300
Subject: [PATCH] Bug 13791: make koha-common init script aware of plack

This patch makes the packages' koha-common script aware of plack.
It does so by relying on koha-list --plack to know which instances
have Plack configured, and uses the koha-plack script to manage
the running daemons.
---
 debian/koha-common.init | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/debian/koha-common.init b/debian/koha-common.init
index 241aaa6..65abbd3 100755
--- a/debian/koha-common.init
+++ b/debian/koha-common.init
@@ -49,6 +49,7 @@ do_start()
     koha-create-dirs $(koha-list)
     koha-start-zebra $(koha-list --enabled)
     koha-start-sip $(koha-list --enabled)
+    koha-plack --start --quiet $(koha-list --enabled --plack) 
 
     if [ "$USE_INDEXER_DAEMON" = "yes" ]; then
         koha-indexer --start --quiet $(koha-list --enabled)
@@ -63,6 +64,7 @@ do_stop()
     # We stop everything, including disabled ones.
     koha-stop-zebra $(koha-list) || true
     koha-stop-sip $(koha-list) || true
+    koha-plack --stop --quiet $(koha-list --enabled --plack)
 
     if [ "$USE_INDEXER_DAEMON" = "yes" ]; then
         koha-indexer --stop --quiet $(koha-list --enabled)
@@ -76,6 +78,7 @@ do_reload() {
     koha-restart-zebra $(koha-list --enabled)
     koha-stop-sip $(koha-list) || true
     koha-start-sip $(koha-list --enabled)
+    koha-plack --restart --quiet $(koha-list --enabled --plack)
 
     if [ "$USE_INDEXER_DAEMON" = "yes" ]; then
         koha-indexer --restart --quiet $(koha-list --enabled)
-- 
2.5.0