summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2017-01-10 14:49:40 +0100
committerHolger Levsen <holger@layer-acht.org>2017-01-10 14:49:40 +0100
commitdefe08d705776a51cadadb1aea6d88a04a91aa6e (patch)
tree39c172b0ec72dccd4ca1e6ea02de03650fb79e0b /bin
parent8a49ca46276ddc02196552d6b7abf2d25124aae0 (diff)
downloadjenkins.debian.net-defe08d705776a51cadadb1aea6d88a04a91aa6e.tar.xz
reproducible Debian: only include yesterdays problems when mailing postgres.log
Signed-off-by: Holger Levsen <holger@layer-acht.org>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_maintenance.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/reproducible_maintenance.sh b/bin/reproducible_maintenance.sh
index 8cfdabaf..c6e7c63a 100755
--- a/bin/reproducible_maintenance.sh
+++ b/bin/reproducible_maintenance.sh
@@ -420,8 +420,9 @@ if [ "$HOSTNAME" = "$MAINNODE" ] && [ $(date -u +%H) -eq 0 ] ; then
# maybe we should use logrotate for our jenkins logs too…
mv $PROBLEM $TMPFILE
else
- # regular logfile, logrotate is used (and the file aint owned by jenkins)
- cp $PROBLEM $TMPFILE
+ # regular logfile, logrotate is used (and the file ain't owned by jenkins)
+ # only care for yesterday's entries:
+ grep $(date -u -d "1 day ago" '+%Y-%m-%d') $PROBLEM > $TMPFILE || echo "no problems yesterday…" > $TMPFILE
fi
( if [ "$(basename $PROBLEM)" = "reproducible-diskspace-issues.log" ]; then
echo "diskspace issues should always be investigated."