From: Joerg Jaspert Date: Tue, 10 Mar 2009 21:30:13 +0000 (+0100) Subject: dinstall X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=ec2548b155c22b68b7340b25087ca71defd64c21;p=dak.git dinstall use maillogfile (and remove tabs) Signed-off-by: Joerg Jaspert --- diff --git a/config/debian/cron.dinstall b/config/debian/cron.dinstall index 3ce42331..5f17739a 100755 --- a/config/debian/cron.dinstall +++ b/config/debian/cron.dinstall @@ -345,17 +345,19 @@ function maillogfile() { } function renamelogfile() { - if [ -f "${dbdir}/dinstallstart" ]; then - RENAMETO=$(cat "${dbdir}/dinstallstart") - mv "$LOGFILE" "$logdir/dinstall_${RENAMETO}.log" - logstats "$logdir/dinstall_${RENAMETO}.log" - bzip2 -9 "$logdir/dinstall_${RENAMETO}.log" - else - error "Problem, I don't know when dinstall started, unable to do log statistics." - NOW=`date "+%Y.%m.%d-%H:%M:%S"` - mv "$LOGFILE" "$logdir/dinstall_${NOW}.log" - bzip2 -9 "$logdir/dinstall_${NOW}.log" - fi + if [ -f "${dbdir}/dinstallstart" ]; then + NOW=$(cat "${dbdir}/dinstallstart") + maillogfile + mv "$LOGFILE" "$logdir/dinstall_${NOW}.log" + logstats "$logdir/dinstall_${NOW}.log" + bzip2 -9 "$logdir/dinstall_${NOW}.log" + else + error "Problem, I don't know when dinstall started, unable to do log statistics." + NOW=`date "+%Y.%m.%d-%H:%M:%S"` + maillogfile + mv "$LOGFILE" "$logdir/dinstall_${NOW}.log" + bzip2 -9 "$logdir/dinstall_${NOW}.log" + fi } function testingsourcelist() {