View | Details | Raw Unified | Return to bug 8519
Collapse All | Expand All

(-)a/Makefile.PL (+1 lines)
Lines 523-528 if ($config{'INSTALL_ZEBRA'} eq "yes") { Link Here
523
    push @{ $pl_files->{'rewrite-config.PL'} }, (
523
    push @{ $pl_files->{'rewrite-config.PL'} }, (
524
        'blib/SCRIPT_DIR/koha-zebra-ctl.sh',
524
        'blib/SCRIPT_DIR/koha-zebra-ctl.sh',
525
        'blib/SCRIPT_DIR/koha-pazpar2-ctl.sh',
525
        'blib/SCRIPT_DIR/koha-pazpar2-ctl.sh',
526
        'blib/SCRIPT_DIR/koha-index-daemon-ctl.sh',
526
    );
527
    );
527
    if ($config{'INSTALL_PAZPAR2'} eq 'yes') {
528
    if ($config{'INSTALL_PAZPAR2'} eq 'yes') {
528
        push @{ $pl_files->{'rewrite-config.PL'} }, (
529
        push @{ $pl_files->{'rewrite-config.PL'} }, (
(-)a/install_misc/install_koha_on_fresh_debian (+2 lines)
Lines 523-528 a2ensite koha Link Here
523
invoke-rc.d apache2 reload
523
invoke-rc.d apache2 reload
524
524
525
koha_script=`makefile_value KOHA_DEST_SCRIPT_DIR`
525
koha_script=`makefile_value KOHA_DEST_SCRIPT_DIR`
526
ln -s "$koha_script"/koha-index-daemon-ctl.sh  /etc/init.d/koha-index-daemon
527
update-rc.d koha-index-daemon defaults
526
528
527
# TODO:
529
# TODO:
528
# - add translator
530
# - add translator
(-)a/misc/bin/koha-index-daemon-ctl.sh (+86 lines)
Line 0 Link Here
1
#!/bin/sh
2
3
# This file is part of Koha.
4
#
5
# Koha is free software; you can redistribute it and/or modify it under the
6
# terms of the GNU General Public License as published by the Free Software
7
# Foundation; either version 2 of the License, or (at your option) any later
8
# version.
9
#
10
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
11
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
13
#
14
# You should have received a copy of the GNU General Public License along with
15
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
16
# Suite 330, Boston, MA  02111-1307 USA
17
18
### BEGIN INIT INFO
19
# Provides:          koha-index-daemon-$DBNAME
20
# Required-Start:    $local_fs $syslog
21
# Required-Stop:     $local_fs $syslog
22
# Default-Start:     2 3 4 5
23
# Default-Stop:      0 1 6
24
# X-Interactive:     false
25
# Short-Description: Start/stop koha-index-daemon for $DBNAME
26
### END INIT INFO
27
28
. /lib/lsb/init-functions
29
30
USER=__KOHA_USER__
31
GROUP=__KOHA_GROUP__
32
DBNAME=__DB_NAME__
33
NAME=koha-index-daemon-$DBNAME
34
LOGDIR=__LOG_DIR__
35
PERL5LIB=__PERL_MODULE_DIR__
36
KOHA_CONF=__KOHA_CONF_DIR__/koha-conf.xml
37
ERRLOG=$LOGDIR/koha-index-daemon.err
38
STDOUT=$LOGDIR/koha-index-daemon.log
39
OUTPUT=$LOGDIR/koha-index-daemon-output.log
40
41
export KOHA_CONF
42
export PERL5LIB
43
44
INDEXDAEMON="koha-index-daemon"
45
INDEXDAEMON_OPTS="--timeout 30 --conf $KOHA_CONF \
46
                  --directory /var/tmp/koha-index-daemon-$DBNAME"
47
48
DAEMONOPTS="--name=$NAME \
49
            --errlog=$ERRLOG \
50
            --stdout=$STDOUT \
51
            --output=$OUTPUT \
52
            --verbose=1 --respawn --delay=30"
53
54
USER="--user=$USER.$GROUP"
55
56
57
case "$1" in
58
    start)
59
      log_daemon_msg "Starting Koha indexing daemon ($DBNAME)"
60
      if daemon $DAEMONOPTS $USER -- $INDEXDAEMON $INDEXDAEMON_OPTS; then
61
        log_end_msg 0
62
      else
63
        log_end_msg 1
64
      fi
65
      ;;
66
    stop)
67
      log_daemon_msg "Stopping Koha indexing daemon ($DBNAME)"
68
      if daemon $DAEMONOPTS $USER --stop -- $INDEXDAEMON $INDEXDAEMON_OPTS; then
69
        log_end_msg 0
70
      else
71
        log_end_msg 1
72
      fi
73
      ;;
74
    restart)
75
      log_daemon_msg "Restarting the Koha indexing daemon ($DBNAME)"
76
      if daemon $DAEMONOPTS $USER --restart -- $INDEXDAEMON $INDEXDAEMON_OPTS; then
77
        log_end_msg 0
78
      else
79
        log_end_msg 1
80
      fi
81
      ;;
82
    *)
83
      log_success_msg "Usage: /etc/init.d/$NAME {start|stop|restart}"
84
      exit 1
85
      ;;
86
esac
(-)a/t/Makefile (-1 / +1 lines)
Lines 29-35 REAL_REWRITE_SCRIPT = ../rewrite-config.PL Link Here
29
ZEBRA_CONF_DIR = run/etc/zebradb
29
ZEBRA_CONF_DIR = run/etc/zebradb
30
ZEBRA_CONF_FILES = $(ZEBRA_CONF_DIR)/etc/passwd $(ZEBRA_CONF_DIR)/zebra-biblios.cfg $(ZEBRA_CONF_DIR)/zebra-authorities.cfg $(ZEBRA_CONF_DIR)/zebra-authorities-dom.cfg $(ZEBRA_CONF_DIR)/explain-authorities.xml $(ZEBRA_CONF_DIR)/explain-biblios.xml $(ZEBRA_CONF_DIR)/retrieval-info-auth-grs1.xml $(ZEBRA_CONF_DIR)/retrieval-info-auth-dom.xml $(ZEBRA_CONF_DIR)/ccl.properties $(ZEBRA_CONF_DIR)/cql.properties $(ZEBRA_CONF_DIR)/pqf.properties
30
ZEBRA_CONF_FILES = $(ZEBRA_CONF_DIR)/etc/passwd $(ZEBRA_CONF_DIR)/zebra-biblios.cfg $(ZEBRA_CONF_DIR)/zebra-authorities.cfg $(ZEBRA_CONF_DIR)/zebra-authorities-dom.cfg $(ZEBRA_CONF_DIR)/explain-authorities.xml $(ZEBRA_CONF_DIR)/explain-biblios.xml $(ZEBRA_CONF_DIR)/retrieval-info-auth-grs1.xml $(ZEBRA_CONF_DIR)/retrieval-info-auth-dom.xml $(ZEBRA_CONF_DIR)/ccl.properties $(ZEBRA_CONF_DIR)/cql.properties $(ZEBRA_CONF_DIR)/pqf.properties
31
31
32
SCRIPTS = koha-zebra-ctl.sh koha-pazpar2-ctl.sh
32
SCRIPTS = koha-zebra-ctl.sh koha-pazpar2-ctl.sh koha-index-daemon-ctl.sh
33
SRC_SCRIPT_DIR = ../misc/bin
33
SRC_SCRIPT_DIR = ../misc/bin
34
TEST_SCRIPT_DIR = run/bin
34
TEST_SCRIPT_DIR = run/bin
35
35
(-)a/t/db_dependent/lib/KohaTest.pm (-3 / +2 lines)
Lines 818-824 sub stop_zebrasrv { Link Here
818
818
819
sub start_zebraqueue_daemon {
819
sub start_zebraqueue_daemon {
820
820
821
    my $command = q(echo "zebraqueue_daemon is deprecated");
821
    my $command = q(run/bin/koha-index-daemon-ctl.sh start);
822
    diag $command;
822
    diag $command;
823
    my $started = system( $command );
823
    my $started = system( $command );
824
    diag "started: $started";
824
    diag "started: $started";
Lines 832-838 sub start_zebraqueue_daemon { Link Here
832
832
833
sub stop_zebraqueue_daemon {
833
sub stop_zebraqueue_daemon {
834
834
835
    my $command = q(echo "zebraqueue_daemon is deprecated");
835
    my $command = q(run/bin/koha-index-daemon-ctl.sh stop);
836
    diag $command;
836
    diag $command;
837
    my $started = system( $command );
837
    my $started = system( $command );
838
    diag "started: $started";
838
    diag "started: $started";
839
- 

Return to bug 8519