diff options
Diffstat (limited to 'bin/maintainance.sh')
-rwxr-xr-x | bin/maintainance.sh | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/bin/maintainance.sh b/bin/maintainance.sh index e5a95265..e5e61ed1 100755 --- a/bin/maintainance.sh +++ b/bin/maintainance.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2012-2014 Holger Levsen <holger@layer-acht.org> +# Copyright 2012-2015 Holger Levsen <holger@layer-acht.org> # released under the GPLv=2 DEBUG=false @@ -34,6 +34,17 @@ chroot_checks() { echo "WARNING: should remove directories in /(s)chroots which are older than a month." } +remove_old_rebootstrap_logs() { + # find and warn about old temp directories + OLDSTUFF=$(find /var/lib/jenkins/jobs/rebootstrap_* -maxdepth 0 -mtime +7 -name log_content.html -exec rm -v {} \;) + fi + if [ ! -z "$OLDSTUFF" ] ; then + echo "Old html logs have been deleted:" + echo "$OLDSTUFF" + fi +} + + report_old_directories() { # find and warn about old temp directories if [ -z "$3" ] ; then @@ -171,6 +182,8 @@ else ;; squid) report_squid_usage ;; + rebootstrap) remove_old_rebootstrap_logs + ;; *) ;; esac fi |