From 2a7082a083d5efb31fd5d981a9a1053514ae1c64 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Thu, 29 Nov 2012 16:55:59 +0100 Subject: cleanup --- bin/housekeeping.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/bin/housekeeping.sh b/bin/housekeeping.sh index 481f331e..74bfdd0a 100755 --- a/bin/housekeeping.sh +++ b/bin/housekeeping.sh @@ -1,4 +1,5 @@ #/bin/bash +# FIXME: make this a general and a specific housekeeping job: # Copyright 2012 Holger Levsen # released under the GPLv=2 @@ -10,17 +11,17 @@ export LC_ALL=C echo uptime + echo df -h + echo -# FIXME: make this a general and a specific housekeeping job: -JOB_PREFIXES=$(ls /var/lib/jenkins/jobs/* -d | cut -d "_" -f1|sort -u) -for DIR in /var/cache/apt/archives/ /var/spool/squid/ /var/cache/pbuilder/build/ $JOB_PREFIXES ; do - sudo du -sh $DIR +for DIR in /var/cache/apt/archives/ /var/spool/squid/ /var/cache/pbuilder/build/ /var/lib/jenkins/jobs/ ; do + sudo du -sh $DIR 2>/dev/null done + echo vnstat -echo CHROOT_PATTERN="/chroots/chroot-tests-*" HOUSE=$(ls $CHROOT_PATTERN) @@ -34,7 +35,9 @@ if [ "$HOUSE" != "" ] ; then exit 1 fi -df |grep tmpfs > /dev/null || echo "Warning: no tmpfs mounts in use. Please investigate the host system." +# FIXME: no tmpfs should really mean exit 1 not 0 +df |grep tmpfs > /dev/null || ( echo "Warning: no tmpfs mounts in use. Please investigate the host system." ; exit 0 ) +echo echo "No problems found, all seems good." figlet "Ok." -- cgit v1.2.3-70-g09d2