Subversion Repositories camp_sysinfo_client_3

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
16 rodolico 1
#! /usr/bin/env perl
12 rodolico 2
 
26 rodolico 3
use warnings;
4
use strict;
5
 
6
our $VERSION = '1.0';
7
 
12 rodolico 8
# get files from server
9
my $saveDir = `pwd`;
10
chomp $saveDir;
11
chdir( '/tmp');
12
 
81 rodolico 13
`wget -q --no-check-certificate https://clara.dailydata.net:22081/uploadFiles299q/sendEmail/sendEmail.tgz`;  
12 rodolico 14
 
15
# Add sendEmail to server   
16
if ( -d '/opt/sendEmail' ) {
17
   warn "/opt/sendEmail exists, moving it to /opt/sendEmail.old\n";
18
   `mv /opt/sendEmail /opt/sendEmail.old`;
19
}
20
chdir('/opt');
21
`tar -xzvf /tmp/sendEmail.tgz`;
22
`chown -fRv root:root /opt/sendEmail`;
23
`chmod 755 /opt/sendEmail/*`;
24
`rm /tmp/sendEmail.tgz`;
25
`ln -s /opt/sendEmail/sendEmail.pl /opt/sendEmail/sendEmail` unless -x '/opt/sendEmail/sendEmail';
26
 
27
chdir( $saveDir );
28
print '/opt/sendEmail/sendEmail';
29
1;