From 3e9e3a0f486f812fe29b6659944c3add6d9336d0 Mon Sep 17 00:00:00 2001 From: Chris Sharp Date: Mon, 19 Dec 2011 12:20:31 -0500 Subject: [PATCH] adding script for EGCR security gates --- .../pines-examples/reports-server/currently-out.sh | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Open-ILS/examples/pines-examples/reports-server/currently-out.sh diff --git a/Open-ILS/examples/pines-examples/reports-server/currently-out.sh b/Open-ILS/examples/pines-examples/reports-server/currently-out.sh new file mode 100644 index 0000000000..2607fc4ef4 --- /dev/null +++ b/Open-ILS/examples/pines-examples/reports-server/currently-out.sh @@ -0,0 +1,32 @@ +#!/bin/sh +# +# This is a script to create a list of barcodes for currently checked out items +# for a library system where one OU has an RFID product that is incompatible with +# all the other branches' setups. The barcodes file is created, then copied to an +# intermediary relay server that FTPs the file to the remote server. +# + + + DATE=`date +%F`; + LFILE=currently-out.ECGR.$DATE + RFILE=syncdata1.txt + RELAYER=216.154.195.229 #content01 + REMOTE_HOST=0.0.0.0 + + echo `date`: Creating $LFILE... + PGUSER=postgres /usr/bin/psql sparkle -tc "SELECT cp.barcode FROM action.circulation circ JOIN asset.copy cp ON (cp.id = circ.target_copy) JOIN actor.org_unit ou ON (ou.id = circ.circ_lib) WHERE ou.shortname in ('ECGR-CCO','ECGR-EUCHE','ECGR-HARLM') AND circ.checkin_time IS NULL;" > $LFILE + + + echo `date`: $LFILE is `ls -lh $LFILE | cut -d' ' -f5`... + echo `date`: Copying $LFILE to relayer as $RFILE... + scp $LFILE rfidrelay@$RELAYER:~/$RFILE + +# echo `date`: not uploading file + echo `date`: Uploading $RFILE from relayer to library.. + ssh rfidrelay@$RELAYER "ncftpput -a -E -u rfidftp -p ilsFTP $REMOTE_HOST / $RFILE" + + echo `date`: Removing $RFILE from relayer... + ssh rfidrelay@$RELAYER "rm -f $RFILE" + + echo `date`: Done + -- 2.11.0