Subversion Repositories sysadmin_scripts

Rev

Rev 104 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 104 Rev 105
Line 48... Line 48...
48
}
48
}
49
 
49
 
50
 
50
 
51
$config = &readConfig();
51
$config = &readConfig();
52
eval( $config );
52
eval( $config );
53
$CONTROL_FOLDER = &getScriptLocation() . '../data' unless $CONTROL_FOLDER;
53
$CONTROL_FOLDER = &getScriptLocation() . '/../data' unless $CONTROL_FOLDER;
54
$CLEANUP_FILE = "$CONTROL_FOLDER/$CLEANUP_FILE";
54
$CLEANUP_FILE = "$CONTROL_FOLDER/$CLEANUP_FILE";
55
 
55
 
56
my @foldersToProcess = &getFoldersToProcess( $CLEANUP_FILE );
56
my @foldersToProcess = &getFoldersToProcess( $CLEANUP_FILE );
57
 
57
 
58
my $totalDeleted = 0;
58
my $totalDeleted = 0;
59
 
59
 
60
print "TEST MODE; no files deleted\n" if $TESTING;
60
print "TEST MODE; no files deleted\n" if $TESTING;
61
print "Cleaning files older than $TEMP_CLEANUP_TIME Days\n";
61
print "Cleaning files older than $TEMP_CLEANUP_TIME Days\n";
62
foreach my $folder ( @foldersToProcess ) {
62
foreach my $folder ( @foldersToProcess ) {
-
 
63
   next unless $folder;
63
   my $deleted = &cleanFolder( $folder );
64
   my $deleted = &cleanFolder( $folder );
64
   print "$folder\t$deleted\n";
65
   print "$folder\t$deleted\n";
65
   $totalDeleted += $deleted;
66
   $totalDeleted += $deleted;
66
 }
67
 }
67
 
68