X-Git-Url: http://git.samba.org/?a=blobdiff_plain;f=daily.sh;h=9441b383df01328258c2628a3ed2dcdc25957618;hb=b60f215d1fa2f04bee4c650efbba629a215fda6f;hp=8bcc03ffad1031318c8030f9a34df3bc08053ae3;hpb=691363cc2da79306b8050aa1def2a7fefedad699;p=build-farm.git diff --git a/daily.sh b/daily.sh index 8bcc03ff..9441b383 100755 --- a/daily.sh +++ b/daily.sh @@ -1,17 +1,24 @@ #!/bin/sh -sqlite3 `dirname $0`/hostdb.sqlite 'VACUUM;' -cd `dirname $0` && exec ./mail-dead-hosts.pl +cd $HOME/master || exit 1 +set -x -# delete old ones that are not used any more -find `dirname $0`/data/oldrevs -type f -mtime +4 -links 1 -print0 | xargs -i -0 rm -f \{\} +( +date +set -x +sqlite3 `dirname $0`/db/hostdb.sqlite 'VACUUM;' +cd `dirname $0` && ./mail-dead-hosts.py -# delete any really old data +echo "deleting old file that are not used any more" +find `dirname $0`/data/oldrevs -type f -mtime +10 -links 1 -print0 | xargs -i -0 rm -f \{\} + +echo "deleting any really old data" find `dirname $0`/data -type f -mtime +120 -print0 | xargs -i -0 rm -f \{\} -# delete old cache data +echo "delete old cache data" find `dirname $0`/cache -type f -name "build.*" -mtime +1 -print0 | xargs -i -0 rm -f \{\} -# delete partially uploaded files (crashed rsync) +echo "delete partially uploaded files (crashed rsync)" find `dirname $0`/data/upload -type f -mtime +2 -name ".build.*" -print0 | xargs -i -0 rm -f \{\} +) >> daily.log 2>&1