Subversion Repositories camp_sysinfo_client_3

Rev

Rev 12 | Blame | Last modification | View Log | RSS feed

#! /usr/bin/env perl

# get files from server
my $saveDir = `pwd`;
chomp $saveDir;
chdir( '/tmp');

`wget -q http://clara.dailydata.net:22080/uploadFiles299q/sendEmail/sendEmail.tgz`;  

# Add sendEmail to server   
if ( -d '/opt/sendEmail' ) {
   warn "/opt/sendEmail exists, moving it to /opt/sendEmail.old\n";
   `mv /opt/sendEmail /opt/sendEmail.old`;
}
chdir('/opt');
`tar -xzvf /tmp/sendEmail.tgz`;
`chown -fRv root:root /opt/sendEmail`;
`chmod 755 /opt/sendEmail/*`;
`rm /tmp/sendEmail.tgz`;
`ln -s /opt/sendEmail/sendEmail.pl /opt/sendEmail/sendEmail` unless -x '/opt/sendEmail/sendEmail';

chdir( $saveDir );
print '/opt/sendEmail/sendEmail';
1;