Subversion Repositories sysadmin_scripts

Rev

Rev 14 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 14 Rev 104
Line 1... Line 1...
1
#! /usr/bin/perl -w
1
#! /usr/bin/perl -w
2
 
2
 
3
my $TESTING=1;
3
my $TESTING=1;
-
 
4
# if set to empty sting, will use script directory/../data
4
my $CONTROL_FOLDER = '/opt/mailmanage/data';
5
my $CONTROL_FOLDER = '';
5
my $CLEANUP_FILE = 'mail_cleanup.list';
6
my $CLEANUP_FILE = 'mail_cleanup.list';
6
my $CONFIG_FILE_NAME = 'mailmanage.cfg';
7
my $CONFIG_FILE_NAME = 'mailmanage.cfg';
7
my $TEMP_CLEANUP_TIME = 7;
8
my $TEMP_CLEANUP_TIME = 7;
8
 
9
 
9
sub getScriptLocation {
10
sub getScriptLocation {
Line 47... Line 48...
47
}
48
}
48
 
49
 
49
 
50
 
50
$config = &readConfig();
51
$config = &readConfig();
51
eval( $config );
52
eval( $config );
-
 
53
$CONTROL_FOLDER = &getScriptLocation() . '../data' unless $CONTROL_FOLDER;
52
$CLEANUP_FILE = "$CONTROL_FOLDER/$CLEANUP_FILE";
54
$CLEANUP_FILE = "$CONTROL_FOLDER/$CLEANUP_FILE";
53
 
55
 
54
my @foldersToProcess = &getFoldersToProcess( $CLEANUP_FILE );
56
my @foldersToProcess = &getFoldersToProcess( $CLEANUP_FILE );
55
 
57
 
56
my $totalDeleted = 0;
58
my $totalDeleted = 0;