Added a note that this module is slated to be removed
[koha.git] / z3950 / z3950-daemon-shell.sh
1 #!/bin/sh
2
3 # $Id$
4
5 # Script to start Koha background Z39.50 search daemon
6
7 # Part of the Koha Library Mgmt System -  www.koha.org
8 # Licensed under the GPL
9
10 #----------------------------
11 # Do NOT run this script directly from system startup-- this should not run as root
12 #    Call  z3950-daemon-launch.sh  instead
13
14 #----------------------------
15
16 KohaZ3950Dir=/usr/local/www/koha/htdocs/cgi-bin/koha/acqui.simple
17 KohaModuleDir=/usr/local/koha/modules
18 LogDir=/var/log/koha
19
20 #----------------------------
21 LOGFILE=$LogDir/z3950-daemon-`date +%Y%m%d-%H%M`.log
22
23 touch $LOGFILE
24 if [ ! -w $LOGFILE ]
25 then
26         echo ERROR: Cannot write to log file $LOGFILE
27         exit 1
28 fi
29
30 KohaZ3950Script=$KohaZ3950Dir/processz3950queue
31 if [ ! -x $KohaZ3950Script ]
32 then
33         echo ERROR: Cannot find Koha Z39.50 daemon script $KohaZ3950Script
34         exit 1
35 fi
36
37 PERL5LIB=$KohaModuleDir
38 export PERL5LIB
39
40 exec $KohaZ3950Script $LogDir >>$LOGFILE 2>&1
41
42 #-------------------
43 # $Log$
44 # Revision 1.1  2002/11/22 10:15:22  tipaul
45 # moving z3950 related scripts to specific dir
46 #
47 # Revision 1.3  2002/07/02 22:08:50  tonnesen
48 # merging changes from rel-1-2
49 #
50 # Revision 1.1.2.3  2002/06/28 17:45:39  tonnesen
51 # z3950queue now listens for a -HUP signal before processing the queue.  Z3950.pm
52 # sends the -HUP signal when queries are added to the queue.
53 #
54 # Revision 1.1.2.2  2002/06/26 16:25:51  amillar
55 # Make directory variable name more explanatory
56 #