Rev 16 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | 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;