wrapper script for generating offline blocked patron list
authorJeff Davis <jdavis@sitka.bclibraries.ca>
Tue, 16 Jun 2015 18:27:07 +0000 (11:27 -0700)
committerJeff Davis <jdavis@sitka.bclibraries.ca>
Tue, 16 Jun 2015 18:27:07 +0000 (11:27 -0700)
Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca>
maintenance/update-offline-blocked-list.sh [new file with mode: 0755]

diff --git a/maintenance/update-offline-blocked-list.sh b/maintenance/update-offline-blocked-list.sh
new file mode 100755 (executable)
index 0000000..f5b5561
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/bash
+OFFLINEDIR='/srv/openils/var/data/offline'
+TODAY=`date --rfc-3339=date`
+/srv/openils/bin/offline-blocked-list.pl --config /srv/openils/conf/opensrf_core.xml --requestor /srv/openils/bin/oils_requestor > $OFFLINEDIR/blocked/patron-block-list.$TODAY.txt
+if [ -e "$OFFLINEDIR/blocked/patron-block-list.txt" ] ; then rm $OFFLINEDIR/blocked/patron-block-list.txt ; fi
+cd $OFFLINEDIR/blocked/ && ln -s patron-block-list.$TODAY.txt patron-block-list.txt