Scripts for Z39.50 search daemon

This commit is contained in:
amillar 2002-06-11 06:26:57 +00:00
parent 04c42e54b1
commit 53b128ccdf
2 changed files with 74 additions and 0 deletions

View File

@ -0,0 +1,36 @@
#!/bin/sh
# Script to start Koha background Z39.50 search daemon
# Part of the Koha Library Mgmt System - www.koha.org
# Licensed under the GPL
#----------------------------
# Call this script during system startup, such as from rc.local
# Bugs/To Do:
# Needs SysV-type start/stop options
#----------------------------
# User ID to run the daemon as. Don't use "root"
RunAsUser=apache
KohaDir=/usr/local/www/koha/htdocs/cgi-bin/koha/acqui.simple
export KohaDir
#----------------------------
if [ ! -d $KohaDir ]
then
echo ERROR: Cannot find Koha directory $KohaDir
exit 1
fi
KohaZ3950Shell=$KohaDir/z3950-daemon-shell.sh
if [ ! -x $KohaZ3950Shell ]
then
echo ERROR: Cannot find Koha Z39.50 daemon launcher $KohaZ3950Shell
exit 1
fi
su -s /bin/sh -c '$KohaZ3950Shell &' - $RunAsUser &

View File

@ -0,0 +1,38 @@
#!/bin/sh
# Script to start Koha background Z39.50 search daemon
# Part of the Koha Library Mgmt System - www.koha.org
# Licensed under the GPL
#----------------------------
# Do NOT run this script directly from system startup-
# Call z3950-daemon-launch.sh instead
#----------------------------
KohaDir=/usr/local/www/koha/htdocs/cgi-bin/koha/acqui.simple
KohaModuleDir=/usr/local/koha/modules
LogDir=/var/log/koha
#----------------------------
LOGFILE=$LogDir/z3950-daemon-`date +%Y%m%d-%H%M`.log
touch $LOGFILE
if [ ! -w $LOGFILE ]
then
echo ERROR: Cannot write to log file $LOGFILE
exit 1
fi
KohaZ3950Script=$KohaDir/processz3950queue
if [ ! -x $KohaZ3950Script ]
then
echo ERROR: Cannot find Koha Z39.50 daemon script $KohaZ3950Script
exit 1
fi
PERL5LIB=$KohaModuleDir
export PERL5LIB
exec $KohaDir/processz3950queue >>$LOGFILE 2>&1