X-Git-Url: https://git.madduck.net/etc/mailfilter.git/blobdiff_plain/24471f4714a7838630b60b2ba63391b8f459daa4..48c76ab2a04663c2df60766ca3c813a26d19a5e2:/bin/retrain diff --git a/bin/retrain b/bin/retrain index 784f17e..315d329 100755 --- a/bin/retrain +++ b/bin/retrain @@ -49,10 +49,12 @@ case "$HAM/$SPAM" in esac if [ -n "$maildir" ]; then - LOCKFILE="$maildir/.retrain.lock" + ME="${0##*/}" + LOCKFILE="$maildir/.$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 retrain process is already running over that Maildir." >&2 + 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