2 # Copyright (c) 2010 Index Data, http://www.indexdata.com
4 # irspy-update.sh - wrapper for irspy.pl
6 # run irspy with a smaller set of records in a loop to avoid out-of-memory
8 # for a fast update, run this:
9 # $ env irspy_test=Quick ./irspy-update.sh
12 cd $home/irspy/bin || exit 2
14 lockfile=$logdir/irspy-update.lock
15 statusfile=$logdir/irspy-last-update.log
17 # run a full update by default, use Quick for a fast update
20 mkdir -p $logdir || exit2
22 if [ -f $lockfile ]; then
24 if kill -0 $pid 2>/dev/null; then
25 echo "This script is already running with pid: $pid"
29 echo $$ > $lockfile || exit 2
32 for i in 0 1 2 3 4 5 6
34 logfile=$logdir/irspy-mod-$i.log.$weekday
35 YAZ_LOG=irspy,irspy_test,irspy_task nice -10 time perl -I../lib irspy.pl -n 50 -d -M 3500 -f'cql.allRecords=1 not zeerex.disabled = 1' -t $irspy_test -r ../etc/dallas.rules -m 7,$i localhost:8018/IR-Explain---1 > $logfile 2>&1
37 sleep 1 # catch ctr-c before compressing the log