diff options
author | Othmar Gsenger <otti@wirdorange.org> | 2011-03-31 19:05:23 +0000 |
---|---|---|
committer | Othmar Gsenger <otti@wirdorange.org> | 2011-03-31 19:05:23 +0000 |
commit | d26fa8c1e0886c813de5364ee6570c860c6ce12c (patch) | |
tree | 418120693100150b0443d3d880f945aaa45a0d22 /cron/regen_quota.pl | |
parent | added support for browsing by category (diff) |
hopfully repaired this after backup loss
Diffstat (limited to 'cron/regen_quota.pl')
-rwxr-xr-x | cron/regen_quota.pl | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/cron/regen_quota.pl b/cron/regen_quota.pl new file mode 100755 index 0000000..e582b30 --- /dev/null +++ b/cron/regen_quota.pl @@ -0,0 +1,17 @@ +#!/usr/bin/perl +use strict; +use Cwd 'abs_path'; +use File::Basename; +use local::db; +use config; + +for my $owner (local::db::owner->retrieve_all) +{ + my $sum =0; + for my $dl ($owner->download) + { + $sum+=$dl->size + } + $owner->quota_used($sum); + $owner->update +} |