BCC admins@ instead of docelic@ in quota check
[clinton/scripts.git] / quotacheck
index 4145294..9a8806d 100755 (executable)
@@ -9,10 +9,9 @@
 # and Database volumes. We use quotas to keep the shop clean, not
 # to impose restrictions).
 
-# Script retrieves volume info from deleuze, from there it
-# reads mail., user. and db. volumes into %vol, then
-# sees which volumes have > $threshold usage, relative to volume
-# quota.
+# Script retrieves volume info from the afs server, from there it
+# reads mail., user. and db. volumes into %vol, then sees which
+# volumes have > $threshold usage, relative to volume quota.
 #
 # For volumes above threshold, it extracts the owner name from
 # volume name (like, mail.USERNAME) and saves info to %warn.
@@ -55,13 +54,13 @@ use Data::Dumper qw/Dumper/;
 # Warn threshold
 our %threshold = ( user => 0.8, mail => 0.6, db => 0.4 );
 # AFS servers with volumes
-our @servers = qw/deleuze/;
+our @servers = qw/fritz/;
 # Which volumes we want?
 # (Your volumes need to be in format (TYPE).USERNAME, otherwise
 # you will have to modify below where we take .USERNAME to mean
 # person's USERNAME). Changing this will also trigger changes
 # in template email (see DATA below).
-our $volume_pattern = '(mail|user|db)\.[a-zA-Z0-9]+'; # implicit ^...$
+our $volume_pattern = '(mail|user)\.[a-zA-Z0-9]+'; # implicit ^...$
 # Cache file
 our $statefile = '/var/cache/hcoop/quotacheck';
 # Hash structure containing load of $statefile
@@ -238,7 +237,7 @@ sub email_notify {
                $_ =~ s/\$CRIT{(\w+)}/$warn{$user}{$1} ? " (APPROACHING QUOTA)" : ""/mge;
        }
        #print join('', @msg);
-       open(MAIL, "| mail -s 'Approaching quota limit at HCoop' -a 'From: admins\@hcoop.net' -b 'docelic' '$user\@hcoop.net'");
+       open(MAIL, "| mail -s 'Approaching quota limit at HCoop' -a 'From: admins\@hcoop.net' -b 'admins' '$user\@hcoop.net'");
        { no warnings; print main::MAIL join('', @msg); }
        close MAIL;
 }