From: Ansgar Burchardt Date: Sat, 15 Dec 2012 08:31:00 +0000 (+0100) Subject: config/debian/cron.hourly: remove unchecked lock on failure X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d6d87e79235f0f816dbafa44bb454e0e9d33ef39;p=dak config/debian/cron.hourly: remove unchecked lock on failure --- 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