Subversion Repositories sysadmin_scripts

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
156 rodolico 1
#! /usr/bin/perl -w
2
 
3
my @files = `grep -l 'Your request cannot be completed at this time due to query limit controls.' cache/*`;
4
if ( @files ) { 
5
   chomp @files;
6
   my $files = 'rm ' . join ( ' ', @files );
7
#   print '-'x40 . "\n$files\n" . '-'x40 . "\n"; 
8
   print 'Deleting ' . scalar( @files ) . " domain files which were not completely downloaded\n";
9
   `rm $files`;
10
}
11
 
12
if ( open BAD, '<badDomains' ) {
13
   while ( my $line = <BAD> ) {
14
      my ( $domain,$trash ) = split( "\t", $line );
15
      if ( -e "cache/$domain.whois" ) {
16
         print "Deleting bad domain file $domain\n";
17
         `rm cache/$domain.whois`;
18
      }
19
   }
20
   close BAD;
21
}
22
 
23
print "Now, looking for new domains to download\n";
24
`./checkBind.pl | ./checkDomains.pl`;
25
print "Your cache should be up to date\n";
26
1;