Add scripts to start, stop, restart Zebra, and rebuild its indexes.
[koha.git] / debian / koha-common.cron.d
diff --git a/debian/koha-common.cron.d b/debian/koha-common.cron.d
new file mode 100644 (file)
index 0000000..715d1b0
--- /dev/null
@@ -0,0 +1,9 @@
+# /etc/cron.d/koha-common
+#
+# Call koha-rebuild-zebra for each enabled Koha instance, to make sure the
+# Zebra indexes are up to date.
+
+SHELL=/bin/sh
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+
+*/5 * * * * root test -x /usr/sbin/koha-rebuild-zebra && koha-rebuild-zebra $(koha-list --enabled)