#!/bin/bash
OPT_ACTION=""
-OPT_SIP_CONFIG=""
-OPT_PID_DIR=""
+OPT_SIP_CONFIG="SYSCONFDIR/oils_sip.xml"
+OPT_PID_DIR="LOCALSTATEDIR/run"
OPT_SIP_ERR_LOG="/dev/null";
+OPT_Z3950_CONFIG="SYSCONFDIR/oils_z3950.xml"
+OPT_YAZ_CONFIG="SYSCONFDIR/oils_yaz.xml"
+Z3950_LOG="LOCALSTATEDIR/log/oils_z3950.log"
SIP_DIR="/opt/SIPServer";
# ---------------------------------------------------------------------------
function usage {
echo "";
- echo "usage: $0 -d <pid_dir> -s <sip_config> -a <action> -l <sip_err_log>";
+ echo "usage: $0 -d <pid_dir> -s <sip_config> -z <z3950_config> -y <yaz_config> -a <action> -l <sip_err_log>";
echo "";
echo "Actions include:"
echo -e "\tstart_sip"
echo -e "\tstop_sip"
echo -e "\trestart_sip"
+ echo -e "\tstart_z3950"
+ echo -e "\tstop_z3950"
+ echo -e "\trestart_z3950"
+ echo -e "\tstart_all"
+ echo -e "\tstop_all"
+ echo -e "\trestart_all"
exit;
}
"s") OPT_SIP_CONFIG="$OPTARG";;
"d") OPT_PID_DIR="$OPTARG";;
"l") OPT_SIP_ERR_LOG="$OPTARG";;
+ "z") OPT_Z3950_CONFIG="$OPTARG";;
+ "y") OPT_YAZ_CONFIG="$OPTARG";;
"h"|*) usage;;
esac;
done
[ -z "$OPT_ACTION" ] && usage;
PID_SIP="$OPT_PID_DIR/oils_sip.pid";
-
+PID_Z3950="$OPT_PID_DIR/oils_z3950.pid";
# ---------------------------------------------------------------------------
# Utility code for checking the PID files
do_action "start" $PID_SIP "OILS SIP Server";
DIR=$(pwd);
cd $SIP_DIR;
- perl SIPServer.pm "$OPT_SIP_CONFIG" >> "$OPT_SIP_ERR_LOG" 2>&1 &
+ perl SIPServer.pm "$OPT_SIP_CONFIG" >> "$OPT_SIP_ERR_LOG" 2>&1 &
pid=$!;
cd $DIR;
echo $pid > $PID_SIP;
return 0;
}
+function start_z3950 {
+ do_action "start" $PID_Z3950 "OILS Z39.50 Server";
+ simple2zoom -c $OPT_Z3950_CONFIG -- -f $OPT_YAZ_CONFIG >> "$Z3950_LOG" 2>&1 &
+ pid=$!;
+ echo $pid > $PID_Z3950;
+ return 0;
+}
+
+function stop_z3950 {
+ do_action "stop" $PID_Z3950 "OILS Z39.50 Server";
+ return 0;
+}
# ---------------------------------------------------------------------------
"start_sip") start_sip;;
"stop_sip") stop_sip;;
"restart_sip") stop_sip; start_sip;;
+ "start_z3950") start_z3950;;
+ "stop_z3950") stop_z3950;;
+ "restart_z3950") stop_z3950; start_z3950;;
+ "start_all") start_sip; start_z3950;;
+ "stop_all") stop_sip; stop_z3950;;
+ "restart_all") stop_sip; stop_z3950; start_sip; start_z3950;;
*) usage;;
esac;
--- /dev/null
+<client>
+ <database name="OILS">
+ <!-- Change "localhost" to your server's name as appropriate. -->
+ <zurl>http://localhost/opac/extras/sru</zurl>
+ <option name="sru">get</option>
+ <charset>marc-8</charset>
+ <search>
+ <querytype>cql</querytype>
+ <map use="4"><index>eg.title</index></map>
+ <map use="7"><index>eg.keyword</index></map>
+ <map use="8"><index>eg.keyword</index></map>
+ <map use="21"><index>eg.subject</index></map>
+ <map use="1003"><index>eg.author</index></map>
+ <map use="1018"><index>eg.publisher</index></map>
+ <map use="1035"><index>eg.keyword</index></map>
+ <map use="1016"><index>eg.keyword</index></map>
+ </search>
+ </database>
+</client>
$(examples)/fm_IDL.xml \
$(examples)/oils_sip.xml.example \
$(examples)/oils_web.xml.example \
- $(examples)/lib_ips.txt.example
+ $(examples)/lib_ips.txt.example \
+ $(examples)/oils_yaz.xml.example \
+ $(examples)/oils_z3950.xml.example
#----------------------------
# Build ILS CORE
$(supportscr)/action_trigger_runner.pl \
$(srcdir)/extras/openurl_map.pl \
$(srcdir)/extras/import/marc_add_ids
-
+
installautojs = $(autojsbinscripts)
#circ-rules-install
sed -i 's|SYSCONFDIR|@sysconfdir@|g' '$(DESTDIR)@bindir@/long-overdue-status-update.pl'
sed -i 's|BINDIR|@bindir@|g' '$(DESTDIR)@bindir@/thaw_expired_frozen_holds.srfsh'
sed -i 's|BINDIR|@bindir@|g' '$(DESTDIR)@bindir@/offline-blocked-list.pl'
+ sed -i 's|LOCALSTATEDIR|@localstatedir@|g' '$(DESTDIR)@bindir@/oils_ctl.sh'
+ sed -i 's|SYSCONFDIR|@sysconfdir@|g' '$(DESTDIR)@bindir@/oils_ctl.sh'
reporter-install:
sed -i 's|SYSCONFDIR|@sysconfdir@|g' '$(DESTDIR)@bindir@/clark-kent.pl'