moving z3950 related scripts to specific dir
[koha.git] / z3950 / z3950-daemon-launch.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 # Call this script during system startup, such as from rc.local
12
13 # Bugs/To Do:
14 #   Needs SysV-type start/stop options
15
16 #----------------------------
17 # User ID to run the daemon as.  Don't use "root"
18 RunAsUser=apache
19
20 KohaZ3950Dir=/usr/local/www/koha/htdocs/cgi-bin/koha/acqui.simple
21 export KohaZ3950Dir
22
23 #----------------------------
24 if [ ! -d $KohaZ3950Dir ]
25 then
26         echo ERROR: Cannot find Koha directory $KohaZ3950Dir
27         exit 1
28 fi
29
30 KohaZ3950Shell=$KohaZ3950Dir/z3950-daemon-shell.sh
31
32 if [ ! -x $KohaZ3950Shell ]
33 then
34         echo ERROR: Cannot find Koha Z39.50 daemon launcher $KohaZ3950Shell
35         exit 1
36 fi
37
38 su -s /bin/sh -c $KohaZ3950Shell - $RunAsUser &
39
40 exit
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/26 19:56:57  tonnesen
51 # Bug fix.  Single quotes were causing $KohaZ3950Shell variable to not get
52 # expanded
53 #
54 # Revision 1.1.2.2  2002/06/26 16:25:51  amillar
55 # Make directory variable name more explanatory
56 #