5 # run irspy with a smaller set of records in a loop to avoid out-of-memory
7 # for a fast update, run this:
8 # $ env irspy_test=Quick ./irspy-update.sh
10 home=/usr/local/src/git
11 cd $home/irspy/bin || exit 2
13 lockfile=$logdir/irspy-update.lock
15 # run a full update by default, use Quick for a fast update
18 mkdir -p $logdir || exit2
20 if [ -f $lockfile ]; then
22 if kill -0 $pid 2>/dev/null; then
23 echo "This script is already running with pid: $pid"
27 echo $$ > $lockfile || exit 2
30 for i in 0 1 2 3 4 5 6
32 logfile=$logdir/irspy-mod-$i.log.$weekday
33 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 -m 7,$i localhost:8018/IR-Explain---1 > $logfile 2>&1
35 sleep 1 # catch ctr-c before compressing the log