diff --git a/quotacheck/do_cron.sh b/quotacheck/do_cron.sh index 7e245ee..1ebe8c6 100644 --- a/quotacheck/do_cron.sh +++ b/quotacheck/do_cron.sh @@ -1,8 +1,15 @@ #!/bin/sh +unset PERL_UNICODE + +ts_dir=/usr/local/dfstat/quotacheck-timestamps + /usr/local/sbin/quotastat /usr/local/sbin/quotacheck -find /usr/local/dfstat/quotacheck-timestamps -type f -name '*:*:*' -print | sed -e 's/.*\///' -e 's/:/ /g' | + +find $ts_dir -type f -name '*:*:*' -mtime +60 -exec rm {} \; + +find $ts_dir -type f -name '*:*:*' -print | sed -e 's/.*\///' -e 's/:/ /g' | while read user mount_t data do g="/usr/local/dfstat/quotacheck-graphs/$user${mount_t}_$data.png" @@ -11,3 +18,4 @@ do @@@scp@@@ "$g" \ "intra.wsr.ac.at:/usr/local/www/intra/informationssysteme/quotas/$user${mount_t}_$data.png" done +find /usr/local/dfstat/quotacheck-graphs/ -atime +60 -exec rm {} \;