From: Frank Lichtenheld Date: Tue, 11 Sep 2007 16:47:57 +0000 (+0200) Subject: daily: Simplify and reduce lockfile wait X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=78590403023af93dddb2df0683214b9bd6d347d2;p=deb%2Fpackages.git daily: Simplify and reduce lockfile wait Use exec for redirecting the output to a log file instead of manually redirecting every command's output. Reduce the lockfile wait times from 50 minutes each to 10 minutes each. With the new, faster cron job it is unlikely we want to queue the jobs anyway. --- diff --git a/bin/daily b/bin/daily index 2c54efe..44c458e 100755 --- a/bin/daily +++ b/bin/daily @@ -32,22 +32,24 @@ then savelog -c 14 $log > /dev/null fi -date > $log +exec >"$log" 2>&1 -if lockfile -600 -r5 "${files}/cron.lock" >> $log 2>&1 +date + +if lockfile -300 -r2 "${files}/cron.lock" then - run-parts --verbose $topdir/cron.d >> $log 2>&1 + run-parts --verbose $topdir/cron.d rm -f "${files}/cron.lock" else - echo "couldn't aquire cron lock file in due time" >> $log + echo "couldn't aquire cron lock file in due time" fi -date >> $log +date -if lockfile -600 -r5 "${files}/changelogs.lock" >> $log 2>&1 +if lockfile -300 -r2 "${files}/changelogs.lock" then - $topdir/bin/extract_changelogs >> $log 2>&1 + $topdir/bin/extract_changelogs rm -f "${files}/changelogs.lock" else - echo "couldn't aquire changelogs lock file in due time" >> $log + echo "couldn't aquire changelogs lock file in due time" fi -date >> $log +date