]> git.deb.at Git - deb/packages.git/blobdiff - bin/daily
daily: Simplify and reduce lockfile wait
[deb/packages.git] / bin / daily
index 2c54efef2e15c2f03b151d9b10d14e216bb7fbd0..44c458e1fe2a5b96ee269c87e99ea33ee6f19b22 100755 (executable)
--- 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