small fix to orders.queue locking

This commit is contained in:
Enno Rehling 2017-09-15 19:59:42 +02:00
parent f83c3a9e9f
commit b224603fea
1 changed files with 3 additions and 2 deletions

View File

@ -18,9 +18,10 @@ else
fi
ls -1rt orders.dir.$TURN/turn-* | xargs cat > orders.$TURN
if [ -e orders.queue ] ; then
lockfile -r3 -l120 orders.queue.lock
if [ -e orders.queue ] ; then
mv orders.queue orders.dir.$TURN/orders.queue
fi
rm -f orders.queue.lock
fi