change logdir to ../log, which should be a symlink to /var/log/irspy
[irspy-moved-to-github.git] / bin / irspy-update.sh
index 5de406d..1c03eb7 100755 (executable)
@@ -7,10 +7,11 @@
 
 home=/usr/local/src/git
 cd $home/irspy/bin || exit 2
-logdir=../tmp
-lockfile=../tmp/irspy-update.lock
-#test=Quick
-test=Main
+logdir=../log
+lockfile=$logdir/irspy-update.lock
+: ${irspy_test=Main}
+
+mkdir -p $logdir || exit2
 
 if [ -f $lockfile ]; then
     pid=`cat $lockfile`
@@ -25,7 +26,9 @@ weekday=`date '+%w'`
 for i in 0 1 2 3 4 5 6
 do
    logfile=$logdir/irspy-mod-$i.log.$weekday
-   YAZ_LOG=irspy,irspy_test,irspy_task nice -10 time perl -I../lib irspy.pl -n 50 -d -M 3500 -a -t $test -m 7,$i localhost:8018/IR-Explain---1 > $logfile 2>&1
+   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
+
+   sleep 1 # catch ctr-c before compressing the log
    gzip -f $logfile
 done