@@ -, +, @@
setup
---
debian/docs/koha-common.xml | 21 ++++++++++++++
debian/docs/koha-restart-indexer.xml | 43 +++++++++++++++++++++++++++++
debian/docs/koha-start-indexer.xml | 43 +++++++++++++++++++++++++++++
debian/docs/koha-stop-indexer.xml | 43 +++++++++++++++++++++++++++++
debian/koha-common.cron.d | 2 +-
debian/koha-common.init | 3 ++
debian/koha-common.install | 3 ++
debian/scripts/koha-create | 3 ++
debian/scripts/koha-restart-indexer | 50 ++++++++++++++++++++++++++++++++++
debian/scripts/koha-start-indexer | 50 ++++++++++++++++++++++++++++++++++
debian/scripts/koha-stop-indexer | 50 ++++++++++++++++++++++++++++++++++
11 files changed, 310 insertions(+), 1 deletion(-)
create mode 100644 debian/docs/koha-restart-indexer.xml
create mode 100644 debian/docs/koha-start-indexer.xml
create mode 100644 debian/docs/koha-stop-indexer.xml
create mode 100755 debian/scripts/koha-restart-indexer
create mode 100755 debian/scripts/koha-start-indexer
create mode 100755 debian/scripts/koha-stop-indexer
--- a/debian/docs/koha-common.xml
+++ a/debian/docs/koha-common.xml
@@ -131,6 +131,27 @@
Stop Zebra for named Koha instances.
+
+
+
+
+ Start the indexer daemon for named Koha instances.
+
+
+
+
+
+
+ Restart the indexer daemon for named Koha instances.
+
+
+
+
+
+
+ Stop the indexer daemon for named Koha instances.
+
+
--- a/debian/docs/koha-restart-indexer.xml
+++ a/debian/docs/koha-restart-indexer.xml
@@ -0,0 +1,43 @@
+
+koha-restart-indexer
+
+Koha is the first free software library automation package.
+
+ The Koha Communnity
+ http://koha-community.org/
+
+
+
+
+
+
+ koha-restart-indexer
+ 8
+
+
+
+ koha-restart-indexer
+ Restart the indexer daemon for named Koha instances.
+ UNIX/Linux
+
+
+
+
+ koha-restart-indexerinstancename
+
+
+
+ Description
+ Restart the indexer daemon for named Koha instances.
+
+
+ See also
+
+ koha-start-indexer(8)
+ koha-stop-indexer(8)
+
+
+
+
+
+
--- a/debian/docs/koha-start-indexer.xml
+++ a/debian/docs/koha-start-indexer.xml
@@ -0,0 +1,43 @@
+
+koha-start-indexer
+
+Koha is the first free software library automation package.
+
+ The Koha Communnity
+ http://koha-community.org/
+
+
+
+
+
+
+ koha-start-indexer
+ 8
+
+
+
+ koha-start-indexer
+ Start the indexer daemon for named Koha instances.
+ UNIX/Linux
+
+
+
+
+ koha-start-indexerinstancename
+
+
+
+ Description
+ Start the indexer daemon for named Koha instances.
+
+
+ See also
+
+ koha-restart-indexer(8)
+ koha-stop-indexer(8)
+
+
+
+
+
+
--- a/debian/docs/koha-stop-indexer.xml
+++ a/debian/docs/koha-stop-indexer.xml
@@ -0,0 +1,43 @@
+
+koha-stop-indexer
+
+Koha is the first free software library automation package.
+
+ The Koha Communnity
+ http://koha-community.org/
+
+
+
+
+
+
+ koha-stop-indexer
+ 8
+
+
+
+ koha-stop-indexer
+ Stop indexer daemon for named Koha instances.
+ UNIX/Linux
+
+
+
+
+ koha-stop-indexerinstancename
+
+
+
+ Description
+ Stop indexer daemon for named Koha instances.
+
+
+ See also
+
+ koha-restart-indexer(8)
+ koha-start-indexer(8)
+
+
+
+
+
+
--- a/debian/koha-common.cron.d
+++ a/debian/koha-common.cron.d
@@ -6,5 +6,5 @@
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)
+# */5 * * * * root test -x /usr/sbin/koha-rebuild-zebra && koha-rebuild-zebra $(koha-list --enabled)
*/15 * * * * root koha-foreach --enabled --email /usr/share/koha/bin/cronjobs/process_message_queue.pl
--- a/debian/koha-common.init
+++ a/debian/koha-common.init
@@ -45,6 +45,7 @@ do_start()
# We insure all required directories exist, including disabled ones.
koha-create-dirs $(koha-list)
koha-start-zebra $(koha-list --enabled)
+ koha-start-indexer $(koha-list --enabled)
}
#
@@ -54,6 +55,7 @@ do_stop()
{
# We stop everything, including disabled ones.
koha-stop-zebra $(koha-list) || true
+ koha-stop-indexer $(koha-list --enabled)
}
#
@@ -61,6 +63,7 @@ do_stop()
#
do_reload() {
koha-restart-zebra $(koha-list --enabled)
+ koha-restart-indexer $(koha-list --enabled)
}
case "$1" in
--- a/debian/koha-common.install
+++ a/debian/koha-common.install
@@ -21,10 +21,13 @@ debian/scripts/koha-mysql usr/sbin
debian/scripts/koha-rebuild-zebra usr/sbin
debian/scripts/koha-remove usr/sbin
debian/scripts/koha-reset-passwd usr/sbin
+debian/scripts/koha-restart-indexer usr/sbin
debian/scripts/koha-restart-zebra usr/sbin
debian/scripts/koha-restore usr/sbin
debian/scripts/koha-run-backups usr/sbin
+debian/scripts/koha-start-indexer usr/sbin
debian/scripts/koha-start-zebra usr/sbin
+debian/scripts/koha-stop-indexer usr/sbin
debian/scripts/koha-stop-zebra usr/sbin
debian/scripts/koha-upgrade-schema usr/sbin
debian/scripts/koha-upgrade-to-3.4 usr/sbin
--- a/debian/scripts/koha-create
+++ a/debian/scripts/koha-create
@@ -340,6 +340,9 @@ then
# Start Zebra.
koha-start-zebra "$name"
+
+ # Start Indexer daemon
+ koha-start-indexer "$name"
fi
--- a/debian/scripts/koha-restart-indexer
+++ a/debian/scripts/koha-restart-indexer
@@ -0,0 +1,50 @@
+#!/bin/sh
+#
+# koha-restart-indexer -- Restart Indexer Daemon for named Koha instandes
+# Copyright 2012 Tomás Cohen Arazi @ Universidad Nacional de Córdoba
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
+set -e
+
+. /lib/lsb/init-functions
+
+INDEXDAEMON="koha-index-daemon"
+PERL5LIB="/usr/share/koha/lib"
+
+for name in "$@"
+do
+
+ KOHA_CONF="/etc/koha/sites/$name/koha-conf.xm"
+
+ INDEXDAEMON_OPTS="--timeout 30 \
+ --conf $KOHA_CONF \
+ --directory /var/tmp/koha-indexer-daemon-$name"
+
+ DAEMONOPTS="--name=$name-koha-indexer \
+ --errlog=/var/log/koha/$name/koha-indexer-error.log \
+ --stdout=/var/log/koha/$name/koha-indexer.log \
+ --output=/var/log/koha/$name/koha-indexer-output.log \
+ --verbose=1 --respawn --delay=30 \
+ --user=$name-koha.$name-koha"
+
+ log_daemon_msg "Restarting Koha indexing daemon for $name"
+
+ if daemon $DAEMONOPTS --restart -- $INDEXDAEMON $INDEXDAEMON_OPTS; then
+ log_end_msg 0
+ else
+ log_end_msg 1
+ fi
+
+done
--- a/debian/scripts/koha-start-indexer
+++ a/debian/scripts/koha-start-indexer
@@ -0,0 +1,50 @@
+#!/bin/sh
+#
+# koha-start-indexer -- Start Indexer Daemon for named Koha instandes
+# Copyright 2012 Tomás Cohen Arazi @ Universidad Nacional de Córdoba
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
+set -e
+
+. /lib/lsb/init-functions
+
+INDEXDAEMON="koha-index-daemon"
+PERL5LIB="/usr/share/koha/lib"
+
+for name in "$@"
+do
+
+ KOHA_CONF="/etc/koha/sites/$name/koha-conf.xm"
+
+ INDEXDAEMON_OPTS="--timeout 30 \
+ --conf $KOHA_CONF \
+ --directory /var/tmp/koha-indexer-daemon-$name"
+
+ DAEMONOPTS="--name=$name-koha-indexer \
+ --errlog=/var/log/koha/$name/koha-indexer-error.log \
+ --stdout=/var/log/koha/$name/koha-indexer.log \
+ --output=/var/log/koha/$name/koha-indexer-output.log \
+ --verbose=1 --respawn --delay=30 \
+ --user=$name-koha.$name-koha"
+
+ log_daemon_msg "Starting Koha indexing daemon for $name"
+
+ if daemon $DAEMONOPTS -- $INDEXDAEMON $INDEXDAEMON_OPTS; then
+ log_end_msg 0
+ else
+ log_end_msg 1
+ fi
+
+done
--- a/debian/scripts/koha-stop-indexer
+++ a/debian/scripts/koha-stop-indexer
@@ -0,0 +1,50 @@
+#!/bin/sh
+#
+# koha-stop-indexer -- Stop Indexer Daemon for named Koha instandes
+# Copyright 2012 Tomás Cohen Arazi @ Universidad Nacional de Córdoba
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
+set -e
+
+. /lib/lsb/init-functions
+
+INDEXDAEMON="koha-index-daemon"
+PERL5LIB="/usr/share/koha/lib"
+
+for name in "$@"
+do
+
+ KOHA_CONF="/etc/koha/sites/$name/koha-conf.xm"
+
+ INDEXDAEMON_OPTS="--timeout 30 \
+ --conf $KOHA_CONF \
+ --directory /var/tmp/koha-indexer-daemon-$name"
+
+ DAEMONOPTS="--name=$name-koha-indexer \
+ --errlog=/var/log/koha/$name/koha-indexer-error.log \
+ --stdout=/var/log/koha/$name/koha-indexer.log \
+ --output=/var/log/koha/$name/koha-indexer-output.log \
+ --verbose=1 --respawn --delay=30 \
+ --user=$name-koha.$name-koha"
+
+ log_daemon_msg "Stopping Koha indexing daemon for $name"
+
+ if daemon $DAEMONOPTS --stop -- $INDEXDAEMON $INDEXDAEMON_OPTS; then
+ log_end_msg 0
+ else
+ log_end_msg 1
+ fi
+
+done
--