summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_maintenance.sh
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-11-28 11:17:38 +0100
committerHolger Levsen <holger@layer-acht.org>2015-11-28 11:17:38 +0100
commite3debea7d3de38a9c07e2d398669810eb3a9c985 (patch)
treecde58777d7dd15654407df7ccc7f4bdd140f67d8 /bin/reproducible_maintenance.sh
parent2f6f0bbfa5ff573b0665848b661bb8e5ebda2efe (diff)
downloadjenkins.debian.net-e3debea7d3de38a9c07e2d398669810eb3a9c985.tar.xz
reproducible: actually do what the comments say, remove stuff older than 2 days
Diffstat (limited to 'bin/reproducible_maintenance.sh')
-rwxr-xr-xbin/reproducible_maintenance.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/bin/reproducible_maintenance.sh b/bin/reproducible_maintenance.sh
index 50bef4e7..19da9311 100755
--- a/bin/reproducible_maintenance.sh
+++ b/bin/reproducible_maintenance.sh
@@ -103,11 +103,11 @@ set -e
# delete old temp directories
echo "$(date -u) - Deleting temp directories, older than 2 days."
-OLDSTUFF=$(find $REP_RESULTS -maxdepth 1 -type d -name "tmp.*" -mtime +2 -exec ls -lad {} \; || true)
+OLDSTUFF=$(find $REP_RESULTS -maxdepth 1 -type d -name "tmp.*" -mtime +1 -exec ls -lad {} \; || true)
if [ ! -z "$OLDSTUFF" ] ; then
echo
echo "Old temp directories found in $REP_RESULTS"
- find $REP_RESULTS -maxdepth 1 -type d -name "tmp.*" -mtime +2 -exec rm -rv {} \; || true
+ find $REP_RESULTS -maxdepth 1 -type d -name "tmp.*" -mtime +1 -exec rm -rv {} \; || true
echo "These old directories have been deleted."
echo
DIRTY=true
@@ -115,12 +115,12 @@ fi
# delete old pbuilder build directories
echo "$(date -u) - Deleting pbuilder build directories, older than 2 days."
-OLDSTUFF=$(find /srv/workspace/pbuilder/ -maxdepth 1 -regex '.*/[0-9]+' -type d -mtime +2 -exec ls -lad {} \; || true)
+OLDSTUFF=$(find /srv/workspace/pbuilder/ -maxdepth 1 -regex '.*/[0-9]+' -type d -mtime +1 -exec ls -lad {} \; || true)
if [ ! -z "$OLDSTUFF" ] ; then
echo
echo "Old temp directories found in $REP_RESULTS"
echo -n "$OLDSTUFF"
- find /srv/workspace/pbuilder/ -maxdepth 1 -regex '.*/[0-9]+' -type d -mtime +2 -exec sudo rm -rf --one-file-system {} \; || true
+ find /srv/workspace/pbuilder/ -maxdepth 1 -regex '.*/[0-9]+' -type d -mtime +1 -exec sudo rm -rf --one-file-system {} \; || true
echo
DIRTY=true
fi
@@ -131,13 +131,13 @@ cleanup_schroot_sessions
# find old schroots
echo "$(date -u) - Removing schroots older than 2 days."
-OLDSTUFF=$(find /schroots/ -maxdepth 1 -type d -regextype posix-extended -regex "/schroots/reproducible-.*-[0-9]{1,5}" -mtime +2 -exec ls -lad {} \; || true)
+OLDSTUFF=$(find /schroots/ -maxdepth 1 -type d -regextype posix-extended -regex "/schroots/reproducible-.*-[0-9]{1,5}" -mtime +1 -exec ls -lad {} \; || true)
if [ ! -z "$OLDSTUFF" ] ; then
echo
echo "schroots older than 2 days found in /schroots, which will be deleted:"
- find /schroots/ -maxdepth 1 -type d -regextype posix-extended -regex "/schroots/reproducible-.*-[0-9]{1,5}" -mtime +2 -exec sudo rm -rf --one-file-system {} \; || true
+ find /schroots/ -maxdepth 1 -type d -regextype posix-extended -regex "/schroots/reproducible-.*-[0-9]{1,5}" -mtime +1 -exec sudo rm -rf --one-file-system {} \; || true
echo "$OLDSTUFF"
- OLDSTUFF=$(find /schroots/ -maxdepth 1 -type d -regextype posix-extended -regex "/schroots/reproducible-.*-[0-9]{1,5}" -mtime +2 -exec ls -lad {} \; || true)
+ OLDSTUFF=$(find /schroots/ -maxdepth 1 -type d -regextype posix-extended -regex "/schroots/reproducible-.*-[0-9]{1,5}" -mtime +1 -exec ls -lad {} \; || true)
if [ ! -z "$OLDSTUFF" ] ; then
echo
echo "Warning: Tried, but failed to delete these:"