cron.d/dsa-buildd: only look for .upload files
[mirror/dsa-puppet.git] / modules / buildd / files / cron.d-dsa-buildd
1 ##
2 ## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
3 ## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
4 ##
5
6 # Restart the build daemons on reboot
7 @reboot buildd [ -f ~buildd/NO-DAEMON-PLEASE ] && grep 'delete-on-boot' ~buildd/NO-DAEMON-PLEASE > /dev/null && rm -f ~buildd/NO-DAEMON-PLEASE && if [ -x ~buildd/.bootscript ]; then ~buildd/.bootscript; else buildd-watcher; fi
8 @reboot buildd2 [ -f ~buildd2/NO-DAEMON-PLEASE ] && grep 'delete-on-boot' ~buildd2/NO-DAEMON-PLEASE > /dev/null && rm -f ~buildd2/NO-DAEMON-PLEASE && if [ -x ~buildd2/.bootscript ]; then ~buildd2/.bootscript; else buildd-watcher; fi
9
10 # Clean old files in the upload queues after 60 days
11 @daily buildd find ~buildd/upload/ ~buildd/upload-security/ -type f -mtime +60 -name '*.upload' | xargs -r awk 'BEGINFILE { DIRNAME=FILENAME ; sub("/[^/]*$", "", DIRNAME) } /^u/ { print DIRNAME"/"$2 } ENDFILE { print FILENAME }' | xargs -r rm -f