X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=config%2Fdebian%2Fcron.hourly;h=51f9d8120a41983597019bdc21d2789f84ed8008;hb=1aaa31abc190aba714ee84c97927696274f8b2c0;hp=cbc687fb219b4e1e1c730d49e640baff46ef0843;hpb=01c3e3976cf234ca463ded32f09ea238251b0155;p=dak.git 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