5 # Script to start Koha background Z39.50 search daemon
7 # Part of the Koha Library Mgmt System - www.koha.org
8 # Licensed under the GPL
10 #----------------------------
11 # Call this script during system startup, such as from rc.local
14 # Needs SysV-type start/stop options
16 #----------------------------
17 . $(dirname $0)/z3950-daemon-options
20 #----------------------------
21 if [ ! -d $KohaZ3950Dir ]
23 echo ERROR: Cannot find Koha directory $KohaZ3950Dir
27 KohaZ3950Shell=$KohaZ3950Dir/z3950-daemon-shell.sh
29 if [ ! -x $KohaZ3950Shell ]
31 echo ERROR: Cannot find Koha Z39.50 daemon launcher $KohaZ3950Shell
35 su -c $KohaZ3950Shell - $RunAsUser &
41 # Revision 1.6 2005/10/26 09:13:54 tipaul
42 # big commit, still breaking things...
44 # * synch with rel_2_2. Probably the last non manual synch, as rel_2_2 should not be modified deeply.
45 # * code cleaning (cleaning warnings from perl -w) continued
47 # Revision 1.4.4.1 2005/06/27 23:10:55 hdl
48 # Removing -s from su call after Thomas D reports it breaks FreeBSD
50 # Revision 1.4 2003/11/05 23:33:45 slef
51 # Now figures out what directory the scripts are in
53 # Revision 1.3 2003/10/06 09:10:39 slef
54 # Removing config info from z3950*sh and using C4::Context in processz3950queue (Fixed bug 39)
56 # Revision 1.2 2003/04/29 16:48:25 tipaul
57 # really proud of this commit :-)
58 # z3950 search and import seems to works fine.
59 # Let me explain how :
60 # * a "search z3950" button is added in the addbiblio template.
61 # * when clicked, a popup appears and z3950/search.pl is called
62 # * z3950/search.pl calls addz3950search in the DB
63 # * the z3950 daemon retrieve the records and stores them in z3950results AND in marc_breeding table.
64 # * as long as there as searches pending, the popup auto refresh every 2 seconds, and says how many searches are pending.
65 # * when the user clicks on a z3950 result => the parent popup is called with the requested biblio, and auto-filled
68 # * character encoding support : (It's a nightmare...) In the z3950servers table, a "encoding" column has been added. You can put "UNIMARC" or "USMARC" in this column. Depending on this, the char_decode in C4::Biblio.pm replaces marc-char-encode by an iso 8859-1 encoding. Note that in the breeding import this value has been added too, for a better support.
69 # * the marc_breeding and z3950* tables have been modified : they have an encoding column and the random z3950 number is stored too for convenience => it's the key I use to list only requested biblios in the popup.
71 # Revision 1.1 2002/11/22 10:15:22 tipaul
72 # moving z3950 related scripts to specific dir
74 # Revision 1.3 2002/07/02 22:08:50 tonnesen
75 # merging changes from rel-1-2
77 # Revision 1.1.2.3 2002/06/26 19:56:57 tonnesen
78 # Bug fix. Single quotes were causing $KohaZ3950Shell variable to not get
81 # Revision 1.1.2.2 2002/06/26 16:25:51 amillar
82 # Make directory variable name more explanatory