summaryrefslogtreecommitdiffstats
path: root/bin/housekeeping.sh
blob: 6f38d430a7eb50b80494e0d8846ed68575a1e460 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#/bin/bash

# Copyright 2012 Holger Levsen <holger@layer-acht.org>
# released under the GPLv=2

export LC_ALL=C
echo 
uptime
echo
df -h
echo
# FIXME: make this a general and a specific housekeeping job:
for DIR in /var/cache/apt/archives/ /var/spool/squid/ /var/lib/jenkins/jobs/ /var/cache/pbuilder/build/ ; do
	sudo du -sh $DIR
done
echo
vnstat
echo

CHROOT_PATTERN="/chroots/chroot-tests-*"
HOUSE=$(ls $CHROOT_PATTERN)
if [ "$HOUSE" != "" ] ; then
	figlet "Warning:"
	echo
	echo "Probably manual cleanup needed:"
	echo
	echo "$ ls -la $CHROOT_PATTERN"
	echo $HOUSE
	exit 1
fi

echo "No problems found, all seems good."
figlet "Ok."