From c2f7d699e27a5e02f1601029c22b753400f99a7e Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Mon, 19 Jun 2017 21:19:39 +0200 Subject: reproducible Debian: only keep build_service logs for a day, there is no point keeping them longer Signed-off-by: Holger Levsen --- bin/reproducible_maintenance.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bin') diff --git a/bin/reproducible_maintenance.sh b/bin/reproducible_maintenance.sh index afc6a407..d5f0c103 100755 --- a/bin/reproducible_maintenance.sh +++ b/bin/reproducible_maintenance.sh @@ -168,13 +168,13 @@ fi # delete build services logfiles if [ "$HOSTNAME" = "$MAINNODE" ] ; then if [ -d /var/lib/jenkins/userContent/reproducible/debian/build_service/ ] ; then - echo "$(date -u) - Deleting logfiles from build services directories, older than 2 days." - OLDSTUFF=$(find /var/lib/jenkins/userContent/reproducible/debian/build_service/ -maxdepth 2 -regex '.*/[0-9]+' -type d -mtime +1 -exec ls -lad {} \; || true) + echo "$(date -u) - Deleting logfiles from build services directories, older than a day." + OLDSTUFF=$(find /var/lib/jenkins/userContent/reproducible/debian/build_service/ -maxdepth 2 -regex '.*/[0-9]+' -type d -mtime +0 -exec ls -lad {} \; || true) if [ ! -z "$OLDSTUFF" ] ; then echo echo "Old logfiles cleaned in /var/lib/jenkins/userContent/reproducible/debian/build_service/" echo -n "$OLDSTUFF" - find /var/lib/jenkins/userContent/reproducible/debian/build_service/ -maxdepth 2 -regex '.*/[0-9]+' -type d -mtime +1 -exec rm -rf --one-file-system {} \; || true + find /var/lib/jenkins/userContent/reproducible/debian/build_service/ -maxdepth 2 -regex '.*/[0-9]+' -type d -mtime +0 -exec rm -rf --one-file-system {} \; || true echo fi fi -- cgit v1.2.3-70-g09d2