From 3c57d5fec723fd1ba272df325ed9a2146fe01e0b Mon Sep 17 00:00:00 2001 From: Janos SUTO Date: Tue, 27 Oct 2020 22:39:16 +0100 Subject: [PATCH] Fixed import.sh locking Signed-off-by: Janos SUTO --- util/import.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/util/import.sh b/util/import.sh index 19b8960b..efff682e 100755 --- a/util/import.sh +++ b/util/import.sh @@ -1,6 +1,5 @@ #!/bin/bash -set -o nounset set -o errexit set -o pipefail @@ -8,7 +7,6 @@ export PATH=$PATH:/usr/libexec/piler:/usr/local/libexec/piler pushd /var/piler/imap -exec 200 > "/tmp/${0}-lock" || exit 1 -flock 200 || exit 1 +[[ "${FLOCKER}" != "$0" ]] && exec env FLOCKER="$0" flock -en "$0" "$0" "$@" + imapfetch.py -i -flock -u 200