From e869cc49fe3143487be56136b0b25904ac2ee154 Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Sun, 15 Apr 2007 16:17:16 +0200 Subject: [PATCH] extract_changelogs: Merge cron job changes from old site Merge the new daily cron job scripts from old site that splits the extract_changelogs from the rest of the cron job. This avoids delaying the rest of the cronjob for the changelog extraction. Using two different lock files also makes the whole site update more robust. --- bin/daily | 10 +++++++++- cron.d/300extract_changelogs => bin/extract_changelogs | 2 -- config.sh.sed.in | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) rename cron.d/300extract_changelogs => bin/extract_changelogs (99%) diff --git a/bin/daily b/bin/daily index f9e8853..0a67587 100755 --- a/bin/daily +++ b/bin/daily @@ -39,7 +39,15 @@ then run-parts --verbose $topdir/cron.d >> $log 2>&1 rm -f "${files}/cron.lock" else - echo "couldn't aquire lock file in due time" >> $log + echo "couldn't aquire cron lock file in due time" >> $log fi +date >> $log +if lockfile -600 -r5 "${files}/changelogs.lock" >> $log 2>&1 +then + $topdir/bin/extract_changelogs >> $log 2>&1 + rm -f "${files}/changelogs.lock" +else + echo "couldn't aquire changelogs lock file in due time" >> $log +fi date >> $log diff --git a/cron.d/300extract_changelogs b/bin/extract_changelogs similarity index 99% rename from cron.d/300extract_changelogs rename to bin/extract_changelogs index d969781..08be087 100755 --- a/cron.d/300extract_changelogs +++ b/bin/extract_changelogs @@ -1,7 +1,5 @@ #!/bin/bash -exit 0 - . `dirname $0`/../config.sh if test -z "${localdir}"; then diff --git a/config.sh.sed.in b/config.sh.sed.in index 1868bce..fffd884 100644 --- a/config.sh.sed.in +++ b/config.sh.sed.in @@ -20,7 +20,7 @@ cachedir=${topdir}/cache # unset this if %SITE% moves somewhere where the packages files # cannot be obtained locally # -#localdir=/org/ftp.debian.org/ftp +localdir=/org/ftp.debian.org/ # path to private ftp directory #ftproot=/org/ftp.root -- 2.39.2