summaryrefslogtreecommitdiffstats
path: root/bin/housekeeping.sh
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2012-11-29 16:55:59 +0100
committerHolger Levsen <holger@layer-acht.org>2012-11-29 16:55:59 +0100
commit2a7082a083d5efb31fd5d981a9a1053514ae1c64 (patch)
treee2241023376a380e47de3a2f694446c6a1f836ef /bin/housekeeping.sh
parent97101439b7dfc5f3cb69086e8d84fbc4dcb9777b (diff)
downloadjenkins.debian.net-2a7082a083d5efb31fd5d981a9a1053514ae1c64.tar.xz
cleanup
Diffstat (limited to 'bin/housekeeping.sh')
-rwxr-xr-xbin/housekeeping.sh15
1 files 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 <holger@layer-acht.org>
# 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."