From e7af75898fc82dff488837203963edf2866b46d4 Mon Sep 17 00:00:00 2001 From: hjp Date: Fri, 25 Oct 2013 09:29:12 +0000 Subject: [PATCH] Diverse Anpassungen und Bugfixes --- quotacheck/do_cron.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 {} \;