updated audio transfer scripts to use astguiclient.conf for settings

updated report generating scripts to use astguiclient.conf for settings
added audio transfer and report FTP settings to the install.pl script

git-svn-id: svn://192.168.202.10@684 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2007-10-05 04:58:51 +00:00
parent f125a74b0c
commit 7a60696bc7
10 changed files with 616 additions and 71 deletions
+22 -8
View File
@@ -9,16 +9,19 @@
#
# CHANGES
# 70905-1409 - First version
# 71005-0054 - Altered script to use astguiclient.conf for settings
#
$txt = '.txt';
$US = '_';
$MT[0] = '';
# optional FTP account variables
$FTP_host = '10.0.0.4';
$FTP_user = 'cron';
$FTP_pass = 'test';
$FTP_dir = 'REPORTS';
# Default FTP account variables
$VARREPORT_host = '10.0.0.4';
$VARREPORT_user = 'cron';
$VARREPORT_pass = 'test';
$VARREPORT_port = '21';
$VARREPORT_dir = 'REPORTS';
# default CLI values
$sale_statuses = 'SALE-UPSELL';
@@ -167,6 +170,17 @@ foreach(@conf)
{$VARDB_pass = $line; $VARDB_pass =~ s/.*=//gi;}
if ( ($line =~ /^VARDB_port/) && ($CLIDB_port < 1) )
{$VARDB_port = $line; $VARDB_port =~ s/.*=//gi;}
if ( ($line =~ /^VARREPORT_host/) && ($CLIREPORT_host < 1) )
{$VARREPORT_host = $line; $VARREPORT_host =~ s/.*=//gi;}
if ( ($line =~ /^VARREPORT_user/) && ($CLIREPORT_user < 1) )
{$VARREPORT_user = $line; $VARREPORT_user =~ s/.*=//gi;}
if ( ($line =~ /^VARREPORT_pass/) && ($CLIREPORT_pass < 1) )
{$VARREPORT_pass = $line; $VARREPORT_pass =~ s/.*=//gi;}
if ( ($line =~ /^VARREPORT_port/) && ($CLIREPORT_port < 1) )
{$VARREPORT_port = $line; $VARREPORT_port =~ s/.*=//gi;}
if ( ($line =~ /^VARREPORT_dir/) && ($CLIREPORT_dir < 1) )
{$VARREPORT_dir = $line; $VARREPORT_dir =~ s/.*=//gi;}
$i++;
}
@@ -313,9 +327,9 @@ if ($ftp_transfer > 0)
use Net::FTP;
if (!$Q) {print "Sending File Over FTP: $outfile\n";}
$ftp = Net::FTP->new("$FTP_host", Port => 21);
$ftp->login("$FTP_user","$FTP_pass");
$ftp->cwd("$FTP_dir");
$ftp = Net::FTP->new("$VARREPORT_host", Port => $VARREPORT_port);
$ftp->login("$VARREPORT_user","$VARREPORT_pass");
$ftp->cwd("$VARREPORT_dir");
$ftp->put("$PATHweb/vicidial/server_reports/$outfile", "$outfile");
$ftp->quit;
}