From d6d87e79235f0f816dbafa44bb454e0e9d33ef39 Mon Sep 17 00:00:00 2001 From: Ansgar Burchardt Date: Sat, 15 Dec 2012 09:31:00 +0100 Subject: [PATCH] config/debian/cron.hourly: remove unchecked lock on failure --- config/debian/cron.hourly | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/config/debian/cron.hourly b/config/debian/cron.hourly index cbc687fb..51f9d812 100755 --- a/config/debian/cron.hourly +++ b/config/debian/cron.hourly @@ -20,10 +20,16 @@ dak import-users-from-passwd # do not run show-new and other stuff in parallel LOCKFILE="$lockdir/unchecked.lock" +cleanup() { + rm -f "${LOCKFILE}" +} + if lockfile -r16 $LOCKFILE 2> /dev/null; then + trap cleanup EXIT do_new dak show-new > /dev/null || true - rm -f $LOCKFILE + cleanup + trap - EXIT fi dak queue-report -n > $webdir/new.html -- 2.39.5