From: Wolfram Schneider Date: Fri, 23 Apr 2010 13:00:54 +0000 (+0000) Subject: Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/irspy X-Git-Tag: CPAN-v1.02~99^2 X-Git-Url: http://git.indexdata.com/?p=irspy-moved-to-github.git;a=commitdiff_plain;h=ea09903cfa93b2516c12f7af897825da6e630d51;hp=612011ecac24a967f043cd085dd2a3f0a91de2b8 Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/irspy --- diff --git a/bin/irspy-update.sh b/bin/irspy-update.sh index 90d5259..a29d167 100755 --- a/bin/irspy-update.sh +++ b/bin/irspy-update.sh @@ -8,6 +8,16 @@ 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 @@ -16,3 +26,5 @@ do gzip -f $logfile done +rm -f $lockfile +