From 44d81b23b6b7d785673cb8a0e7a23b31b2c8a4a2 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Mon, 3 Nov 2014 04:02:11 +0100 Subject: maintainance: report old d-i build dirs --- bin/maintainance.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'bin/maintainance.sh') diff --git a/bin/maintainance.sh b/bin/maintainance.sh index 02292c4e..c9ed9db5 100755 --- a/bin/maintainance.sh +++ b/bin/maintainance.sh @@ -34,6 +34,17 @@ chroot_checks() { echo "WARNING: should remove directories in /(s)chroots which are older than a month." } +report_old_directories() { + # find and warn about old temp directories + OLDSTUFF=$(find $1/* -maxdepth 0 -type d -mtime +$2 -exec ls -lad {} \;) + if [ ! -z "$OLDSTUFF" ] ; then + echo "Warning: old temp directories found in $REP_RESULTS" + echo "$OLDSTUFF" + echo "Please cleanup manually." + echo + fi +} + report_disk_usage() { if [ -z "$WATCHED_JOBS" ] ; then echo "File system usage for all ${1} jobs:" @@ -152,6 +163,8 @@ else echo "WARNING: there is no check / handling on stale lvm volumes" rm $ACTIVE_JOBS $WATCHED_JOBS $RUNNING ;; + d-i) report_old_directories /srv/d-i 7 + ;; squid) report_squid_usage ;; *) ;; -- cgit v1.2.3-70-g09d2