3 # This file is part of Koha.
5 # Koha is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
10 # Koha is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with Koha; if not, see <http://www.gnu.org/licenses>.
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
24 # X-Interactive: false
25 # Short-Description: Start/stop koha-index-daemon for $DBNAME
28 .
/lib
/lsb
/init-functions
33 NAME
=koha-index-daemon-
$DBNAME
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
44 INDEXDAEMON
="koha-index-daemon"
45 INDEXDAEMON_OPTS
="--timeout 30 --conf $KOHA_CONF \
46 --directory /var/tmp/koha-index-daemon-$DBNAME"
48 DAEMONOPTS
="--name=$NAME \
52 --verbose=1 --respawn --delay=30"
54 USER
="--user=$USER.$GROUP"
59 log_daemon_msg
"Starting Koha indexing daemon ($DBNAME)"
60 if daemon
$DAEMONOPTS $USER -- $INDEXDAEMON $INDEXDAEMON_OPTS; then
67 log_daemon_msg
"Stopping Koha indexing daemon ($DBNAME)"
68 if daemon
$DAEMONOPTS $USER --stop -- $INDEXDAEMON $INDEXDAEMON_OPTS; then
75 log_daemon_msg
"Restarting the Koha indexing daemon ($DBNAME)"
76 if daemon
$DAEMONOPTS $USER --restart -- $INDEXDAEMON $INDEXDAEMON_OPTS; then
83 log_success_msg
"Usage: /etc/init.d/$NAME {start|stop|restart}"