ffzg/recall_notices.pl: added --interval and --dedup
[koha.git] / debian / koha-common.init
index b461056..99df08b 100755 (executable)
@@ -1,14 +1,16 @@
 #! /bin/sh
 ### BEGIN INIT INFO
 # Provides:          koha-common
-# Required-Start:    $remote_fs
+# Required-Start:    $remote_fs memcached
 # Required-Stop:     $remote_fs
 # Default-Start:     2 3 4 5
 # Default-Stop:      0 1 6
-# Short-Description: Start Zebra server for each Koha instance
+# Short-Description: Start required services for each Koha instance
 # Description:       For each enabled Koha instance on this host,
-#                    as listed by "koha-list --enabled", start a Zebra
-#                    server (using koha-start-zebra).
+#                    if enabled, start:
+#                      - a Zebra server (using koha-zebra)
+#                      - a Plack server (using koha-plack)
+#                      - a SIP server   (using koha-sip)
 ### END INIT INFO
 
 # Author: Lars Wirzenius <lars@catalyst.net.nz>
@@ -22,7 +24,7 @@ NAME="koha-common"
 SCRIPTNAME=/etc/init.d/$NAME
 
 # Exit if the package is not installed
-[ -x /usr/sbin/koha-start-zebra ] || exit 0
+[ -x /usr/sbin/koha-zebra ] || exit 0
 
 # Read configuration variable file if it is present
 if [ -r /etc/default/$NAME ]; then
@@ -55,8 +57,8 @@ do_start()
 {
     # We insure all required directories exist, including disabled ones.
     koha-create-dirs $(koha-list)
-    koha-start-zebra $(koha-list --enabled)
-    koha-start-sip $(koha-list --enabled)
+    koha-zebra --start $(koha-list --enabled)
+    koha-sip   --start $(koha-list --enabled --sip)
     koha-plack --start $(koha-list --enabled --plack)
 
     if [ "$USE_INDEXER_DAEMON" = "yes" ]; then
@@ -70,8 +72,8 @@ do_start()
 do_stop()
 {
     # We stop everything, including disabled ones.
-    koha-stop-zebra $(koha-list) || true
-    koha-stop-sip $(koha-list) || true
+    koha-zebra --stop $(koha-list) || true
+    koha-sip   --stop $(koha-list --sip)
     koha-plack --stop --quiet $(koha-list --enabled --plack)
 
     if [ "$USE_INDEXER_DAEMON" = "yes" ]; then
@@ -83,9 +85,8 @@ do_stop()
 # Function that sends a SIGHUP to the daemon/service
 #
 do_reload() {
-    koha-restart-zebra $(koha-list --enabled)
-    koha-stop-sip $(koha-list) || true
-    koha-start-sip $(koha-list --enabled)
+    koha-zebra --restart $(koha-list --enabled)
+    koha-sip   --restart $(koha-list --enabled --sip)
     koha-plack --restart --quiet $(koha-list --enabled --plack)
 
     if [ "$USE_INDEXER_DAEMON" = "yes" ]; then