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

(-)a/debian/koha-common.cron.d (-1 / +1 lines)
Lines 6-10 Link Here
6
SHELL=/bin/sh
6
SHELL=/bin/sh
7
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
7
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
8
8
9
*/5 * * * * root test -x /usr/sbin/koha-rebuild-zebra && koha-rebuild-zebra $(koha-list --enabled)
9
# */5 * * * * root test -x /usr/sbin/koha-rebuild-zebra && koha-rebuild-zebra $(koha-list --enabled)
10
*/15 * * * * root koha-foreach --enabled --email /usr/share/koha/bin/cronjobs/process_message_queue.pl
10
*/15 * * * * root koha-foreach --enabled --email /usr/share/koha/bin/cronjobs/process_message_queue.pl
(-)a/debian/koha-common.init (+3 lines)
Lines 45-50 do_start() Link Here
45
    # We insure all required directories exist, including disabled ones.
45
    # We insure all required directories exist, including disabled ones.
46
    koha-create-dirs $(koha-list)
46
    koha-create-dirs $(koha-list)
47
    koha-start-zebra $(koha-list --enabled)
47
    koha-start-zebra $(koha-list --enabled)
48
    koha-start-indexer $(koha-list --enabled)
48
}
49
}
49
50
50
#
51
#
Lines 54-59 do_stop() Link Here
54
{
55
{
55
    # We stop everything, including disabled ones.
56
    # We stop everything, including disabled ones.
56
    koha-stop-zebra $(koha-list) || true
57
    koha-stop-zebra $(koha-list) || true
58
    koha-stop-indexer $(koha-list --enabled)
57
}
59
}
58
60
59
#
61
#
Lines 61-66 do_stop() Link Here
61
#
63
#
62
do_reload() {
64
do_reload() {
63
    koha-restart-zebra $(koha-list --enabled)
65
    koha-restart-zebra $(koha-list --enabled)
66
    koha-restart-indexer $(koha-list --enabled)
64
}
67
}
65
68
66
case "$1" in
69
case "$1" in
(-)a/debian/scripts/koha-restart-indexer (+50 lines)
Line 0 Link Here
1
#!/bin/sh
2
#
3
# koha-restart-indexer -- Restart Indexer Daemon for named Koha instandes
4
# Copyright 2012 Tomás Cohen Arazi @ Universidad Nacional de Córdoba
5
# 
6
# This program is free software: you can redistribute it and/or modify
7
# it under the terms of the GNU General Public License as published by
8
# the Free Software Foundation, either version 3 of the License, or
9
# (at your option) any later version.
10
# 
11
# This program is distributed in the hope that it will be useful,
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
# GNU General Public License for more details.
15
# 
16
# You should have received a copy of the GNU General Public License
17
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
18
19
set -e
20
21
. /lib/lsb/init-functions
22
23
INDEXDAEMON="koha-index-daemon"
24
PERL5LIB="/usr/share/koha/lib"
25
26
for name in "$@"
27
do
28
29
      KOHA_CONF="/etc/koha/sites/$name/koha-conf.xm"
30
31
      INDEXDAEMON_OPTS="--timeout 30 \
32
                        --conf $KOHA_CONF \
33
                        --directory /var/tmp/koha-indexer-daemon-$name"
34
35
      DAEMONOPTS="--name=$name-koha-indexer \
36
            --errlog=/var/log/koha/$name/koha-indexer-error.log \
37
            --stdout=/var/log/koha/$name/koha-indexer.log \
38
            --output=/var/log/koha/$name/koha-indexer-output.log \
39
            --verbose=1 --respawn --delay=30 \
40
            --user=$name-koha.$name-koha"
41
42
      log_daemon_msg "Restarting Koha indexing daemon for $name"
43
44
      if daemon $DAEMONOPTS --restart -- $INDEXDAEMON $INDEXDAEMON_OPTS; then
45
        log_end_msg 0
46
      else
47
        log_end_msg 1
48
      fi
49
50
done
(-)a/debian/scripts/koha-start-indexer (+50 lines)
Line 0 Link Here
1
#!/bin/sh
2
#
3
# koha-start-indexer -- Start Indexer Daemon for named Koha instandes
4
# Copyright 2012 Tomás Cohen Arazi @ Universidad Nacional de Córdoba
5
# 
6
# This program is free software: you can redistribute it and/or modify
7
# it under the terms of the GNU General Public License as published by
8
# the Free Software Foundation, either version 3 of the License, or
9
# (at your option) any later version.
10
# 
11
# This program is distributed in the hope that it will be useful,
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
# GNU General Public License for more details.
15
# 
16
# You should have received a copy of the GNU General Public License
17
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
18
19
set -e
20
21
. /lib/lsb/init-functions
22
23
INDEXDAEMON="koha-index-daemon"
24
PERL5LIB="/usr/share/koha/lib"
25
26
for name in "$@"
27
do
28
29
      KOHA_CONF="/etc/koha/sites/$name/koha-conf.xm"
30
31
      INDEXDAEMON_OPTS="--timeout 30 \
32
                        --conf $KOHA_CONF \
33
                        --directory /var/tmp/koha-indexer-daemon-$name"
34
35
      DAEMONOPTS="--name=$name-koha-indexer \
36
            --errlog=/var/log/koha/$name/koha-indexer-error.log \
37
            --stdout=/var/log/koha/$name/koha-indexer.log \
38
            --output=/var/log/koha/$name/koha-indexer-output.log \
39
            --verbose=1 --respawn --delay=30 \
40
            --user=$name-koha.$name-koha"
41
42
      log_daemon_msg "Starting Koha indexing daemon for $name"
43
44
      if daemon $DAEMONOPTS -- $INDEXDAEMON $INDEXDAEMON_OPTS; then
45
        log_end_msg 0
46
      else
47
        log_end_msg 1
48
      fi
49
50
done
(-)a/debian/scripts/koha-stop-indexer (-1 / +50 lines)
Line 0 Link Here
0
- 
1
#!/bin/sh
2
#
3
# koha-stop-indexer -- Stop Indexer Daemon for named Koha instandes
4
# Copyright 2012 Tomás Cohen Arazi @ Universidad Nacional de Córdoba
5
# 
6
# This program is free software: you can redistribute it and/or modify
7
# it under the terms of the GNU General Public License as published by
8
# the Free Software Foundation, either version 3 of the License, or
9
# (at your option) any later version.
10
# 
11
# This program is distributed in the hope that it will be useful,
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
# GNU General Public License for more details.
15
# 
16
# You should have received a copy of the GNU General Public License
17
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
18
19
set -e
20
21
. /lib/lsb/init-functions
22
23
INDEXDAEMON="koha-index-daemon"
24
PERL5LIB="/usr/share/koha/lib"
25
26
for name in "$@"
27
do
28
29
      KOHA_CONF="/etc/koha/sites/$name/koha-conf.xm"
30
31
      INDEXDAEMON_OPTS="--timeout 30 \
32
                        --conf $KOHA_CONF \
33
                        --directory /var/tmp/koha-indexer-daemon-$name"
34
35
      DAEMONOPTS="--name=$name-koha-indexer \
36
            --errlog=/var/log/koha/$name/koha-indexer-error.log \
37
            --stdout=/var/log/koha/$name/koha-indexer.log \
38
            --output=/var/log/koha/$name/koha-indexer-output.log \
39
            --verbose=1 --respawn --delay=30 \
40
            --user=$name-koha.$name-koha"
41
42
      log_daemon_msg "Stopping Koha indexing daemon for $name"
43
44
      if daemon $DAEMONOPTS --stop -- $INDEXDAEMON $INDEXDAEMON_OPTS; then
45
        log_end_msg 0
46
      else
47
        log_end_msg 1
48
      fi
49
50
done

Return to bug 8773