projects
/
irspy-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rewritten to support more options
[irspy-moved-to-github.git]
/
bin
/
irspy-update.sh
diff --git
a/bin/irspy-update.sh
b/bin/irspy-update.sh
index
fea2758
..
a29d167
100755
(executable)
--- a/
bin/irspy-update.sh
+++ b/
bin/irspy-update.sh
@@
-8,11
+8,23
@@
home=/usr/local/src/git
cd $home/irspy/bin || exit 2
logdir=../tmp
home=/usr/local/src/git
cd $home/irspy/bin || exit 2
logdir=../tmp
+lockfile=../tmp/irspy-update.lock
+
+if [ -f $lockfile ]; then
+ pid=`cat $lockfile`
+ if kill -0 $pid 2>/dev/null; then
+ echo "This script is already running with pid: $pid"
+ exit 1
+ fi
+fi
+echo $$ > $lockfile || exit 2
for i in 0 1 2 3 4 5 6
do
for i in 0 1 2 3 4 5 6
do
- logfile=$logdir/irspy-mod-$i.log.`date '%w'`
+ logfile=$logdir/irspy-mod-$i.log.`date '+%w'`
YAZ_LOG=irspy,irspy_test nice -10 time perl -I../lib irspy.pl -n 50 -d -M 3500 -a -t Main -m 7,$i localhost:8018/IR-Explain---1 > $logfile 2>&1
gzip -f $logfile
done
YAZ_LOG=irspy,irspy_test nice -10 time perl -I../lib irspy.pl -n 50 -d -M 3500 -a -t Main -m 7,$i localhost:8018/IR-Explain---1 > $logfile 2>&1
gzip -f $logfile
done
+rm -f $lockfile
+