From 0e6eacc9f69070b1fc89c6a47a6dc9250e62b3c6 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Tue, 16 Dec 2014 11:47:55 -0500 Subject: [PATCH] Script for starting zoom server on utility Signed-off-by: Bill Erickson --- KCLS/utility-scripts/start-zoom.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 KCLS/utility-scripts/start-zoom.sh diff --git a/KCLS/utility-scripts/start-zoom.sh b/KCLS/utility-scripts/start-zoom.sh new file mode 100755 index 0000000000..19cbb87e85 --- /dev/null +++ b/KCLS/utility-scripts/start-zoom.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# Start the simple2zoom SRU/Z39.50 service +# Listens on localhost:2210 and this machine's FQDN +# Must be run with sudo / root, since it uses port 210 +set -eu +PUBLIC_HOST=$(hostname -f); +ZOOM_LOG=/openils/var/log/zoom-server.log + +# create a backup of the log file +# NOTE: this needs rotating +[ -f $ZOOM_LOG ] && mv $ZOOM_LOG $ZOOM_LOG.$(date +%F); + +# create the file so we can safely chown it later +touch /openils/var/log/zoom-server.log + +nohup /usr/bin/perl \ + -w /usr/bin/simple2zoom \ + -c /openils/conf/dgo.conf -- \ + -f /openils/conf/xml2marc-yaz.cfg \ + localhost:2210 $PUBLIC_HOST:210 > $ZOOM_LOG & + +chown opensrf:opensrf $ZOOM_LOG -- 2.11.0