From 255cc8f7d17aeb999055bf42675d8786681c9378 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 14 Feb 2008 13:12:04 +0000 Subject: [PATCH] PID in lockfile, also prints when exists before run. --- backup.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backup.sh b/backup.sh index 18968c8..ae40678 100755 --- a/backup.sh +++ b/backup.sh @@ -63,12 +63,12 @@ trap die SIGINT SIGTERM # Don't start if we're already running if [ -e $LOCKFILE ]; then - echo `date`": $LOCKFILE exists, exiting." - echo `date`": $LOCKFILE exists, exiting." >&2 + echo `date`": $LOCKFILE exists for pid `cat $LOCKFILE`, exiting." + echo `date`": $LOCKFILE exists for pid `cat $LOCKFILE`, exiting." >&2 exit 1 fi; touch $LOCKFILE -echo "$$" > $LOCKFILE +echo $$ > $LOCKFILE #syntax of remotestat: #hostname:/directory/ -- 2.39.2