From: Joerg Jaspert Date: Sun, 2 Mar 2014 12:09:25 +0000 (+0100) Subject: cron.daily should have an own logfile X-Git-Url: https://git.donarmstrong.com/?p=dak.git;a=commitdiff_plain;h=dbdb063629442012c56fa90517d221aa9aa1a622 cron.daily should have an own logfile Signed-off-by: Joerg Jaspert --- diff --git a/config/debian/cron.daily b/config/debian/cron.daily index 90c99031..7eda5586 100755 --- a/config/debian/cron.daily +++ b/config/debian/cron.daily @@ -24,7 +24,9 @@ trap cleanup SIGHUP SIGINT SIGPIPE SIGTERM EXIT ERR # log to dinstall's logfile instead of sending email PROGRAM="cron.daily" -LOGFILE="$logdir/dinstall.log" +# Start logging +NOW=`date "+%Y.%m.%d-%H:%M:%S"` +LOGFILE="$logdir/daily_${NOW}.log" exec >> "$LOGFILE" 2>&1 # get the latest list of wnpp bugs and their source packages @@ -64,3 +66,8 @@ dc-tool --mine="${configdir}/contributor.source" --auth-token @"${base}/s3kr1t/c ${scriptsdir}/link_morgue.sh ################################################################################ + +echo "Finally, all is done, compressing logfile" +exec > /dev/null 2>&1 + +bzip2 -9 "$LOGFILE"