]> git.decadent.org.uk Git - dak.git/commitdiff
dinstall
authorJoerg Jaspert <joerg@debian.org>
Tue, 10 Mar 2009 21:30:13 +0000 (22:30 +0100)
committerJoerg Jaspert <joerg@debian.org>
Tue, 10 Mar 2009 21:30:13 +0000 (22:30 +0100)
use maillogfile
(and remove tabs)

Signed-off-by: Joerg Jaspert <joerg@debian.org>
config/debian/cron.dinstall

index 3ce423318d83fcd94e4bb6c2224aa53e385a1058..5f17739a27e283d620e86d2e50fdbbd144f534d8 100755 (executable)
@@ -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() {