Subversion Repositories sysadmin_scripts

Rev

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

Rev 62 Rev 65
Line 29... Line 29...
29
my $installDir = shift;
29
my $installDir = shift;
30
$installDir = ($os eq 'freebsd' ? '/usr/local/opt' : '/opt' ) . '/sendEmail' unless $installDir;
30
$installDir = ($os eq 'freebsd' ? '/usr/local/opt' : '/opt' ) . '/sendEmail' unless $installDir;
31
 
31
 
32
print "Installation Directory = [$installDir]\n";
32
print "Installation Directory = [$installDir]\n";
33
 
33
 
34
# get files from server
-
 
35
#`wget -q http://clara.dailydata.net:22080/uploadFiles299q/sendEmail/sendEmail.tgz`;
-
 
36
 
-
 
37
# Add sendEmail to server
34
# Add sendEmail to server
38
`mkdir -p $installDir`;
35
`mkdir -p $installDir`;
39
copy( "$sourceDir/sendEmail.pl", "$installDir/sendEmail.pl" );
36
foreach my $file ( qw/sendEmail.pl sendmail2sendEmail.pl SYSTEM_VERSION/ ) {
40
copy( "$sourceDir/sendmail2sendEmail.pl", "$installDir/sendmail2sendEmail.pl" );
37
   copy( "$sourceDir/$file", "$installDir/$file" );
-
 
38
}
-
 
39
 
41
`ln -s $installDir/sendEmail.pl $installDir/sendEmail`;
40
`ln -f -s $installDir/sendEmail.pl $installDir/sendEmail`;
42
if ( $os eq 'linux' ) {
41
if ( $os eq 'linux' ) {
43
   `chown -fRv root:root $installDir`;
42
   `chown -fRv root:root $installDir`;
44
}elsif ( $os eq 'freebsd' ) {
43
} elsif ( $os eq 'freebsd' ) {
45
   `chown -fRv root:wheel $installDir`;
44
   `chown -fRv root:wheel $installDir`;
46
}
45
}
47
`chmod 755 $installDir/*`;
46
`chmod 755 $installDir/*`;
48
 
47
 
49
print '1.56';
48
print `$installDir/SYSTEM_VERSION`;
50
1;
49
1;