From 95215adf6d9317e11be1118fb6144396c6dddf04 Mon Sep 17 00:00:00 2001 From: Joerg Jaspert Date: Fri, 18 Dec 2015 22:25:32 +0100 Subject: [PATCH] cron.hourly locks itself --- config/debian/cron.hourly | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/debian/cron.hourly b/config/debian/cron.hourly index 3c58395c..d2451b8a 100755 --- a/config/debian/cron.hourly +++ b/config/debian/cron.hourly @@ -2,6 +2,10 @@ # # Executed hourly via cron, out of dak's crontab. +# Only one of me should ever run. +[ "${FLOCKER}" != "$0" ] && exec env FLOCKER="$0" flock -E 0 -en "$0" "$0" +"$@" || : + set -e set -o pipefail set -u -- 2.39.5