From: martin f. krafft Date: Mon, 3 Aug 2009 06:50:37 +0000 (+0200) Subject: do not remove lockfile after not acquiring it X-Git-Url: https://git.madduck.net/etc/mailfilter.git/commitdiff_plain/e73f7739ac3850c2a4c2297953b9a9ac26a5b616 do not remove lockfile after not acquiring it --- diff --git a/bin/release-delayed-messages b/bin/release-delayed-messages index cdb6da4..73c6b3b 100755 --- a/bin/release-delayed-messages +++ b/bin/release-delayed-messages @@ -11,6 +11,7 @@ LOCKFILE="$VAR/.$ME.lock" trap "rm -f $LOCKFILE" 0 1 2 3 4 5 6 7 8 10 11 12 13 14 15 if ! lockfile -0 -r0 -l 3600 "$LOCKFILE" 2>/dev/null; then echo "E: another $ME process is already running over that Maildir." >&2 + trap - 0 1 2 3 4 5 6 7 8 10 11 12 13 14 15 exit 1 fi diff --git a/bin/resubmit-postponed-messages b/bin/resubmit-postponed-messages index df5663e..6846bde 100755 --- a/bin/resubmit-postponed-messages +++ b/bin/resubmit-postponed-messages @@ -12,6 +12,7 @@ LOCKFILE="$VAR/.$ME.lock" trap "rm -f $LOCKFILE" 0 1 2 3 4 5 6 7 8 10 11 12 13 14 15 if ! lockfile -0 -r0 -l 3600 "$LOCKFILE" 2>/dev/null; then echo "E: another $ME process is already running over that Maildir." >&2 + trap - 0 1 2 3 4 5 6 7 8 10 11 12 13 14 15 exit 1 fi diff --git a/bin/retrain b/bin/retrain index e7acbea..315d329 100755 --- a/bin/retrain +++ b/bin/retrain @@ -54,6 +54,7 @@ if [ -n "$maildir" ]; then trap "rm -f $LOCKFILE" 1 2 3 4 5 6 7 8 10 11 12 13 14 15 if ! lockfile -0 -r0 -l 3600 "$LOCKFILE" 2>/dev/null; then echo "E: another $ME process is already running over that Maildir." >&2 + trap - 0 1 2 3 4 5 6 7 8 10 11 12 13 14 15 exit 1 fi diff --git a/bin/send-outgoing b/bin/send-outgoing index 1d5f800..2aa2381 100755 --- a/bin/send-outgoing +++ b/bin/send-outgoing @@ -12,6 +12,7 @@ LOCKFILE="$OUTBOX/.$ME.lock" trap "rm -f $LOCKFILE" 1 2 3 4 5 6 7 8 10 11 12 13 14 15 if ! lockfile -0 -r0 -l 3600 "$LOCKFILE" 2>/dev/null; then echo "E: another $ME process is already running over that Maildir." >&2 + trap - 0 1 2 3 4 5 6 7 8 10 11 12 13 14 15 exit 1 fi