Merged some changes suggested by Thiago Lima.
This commit is contained in:
parent
16c0233434
commit
573475b70b
|
@ -132,6 +132,7 @@ my %DefaultConf = (
|
|||
'encoding' => 'UTF-8',
|
||||
'server_port' => 41121,
|
||||
'transfer_mode' => 'tentacle',
|
||||
'server_user' => 'pandora',
|
||||
'server_pwd' => '',
|
||||
'server_ssl' => 'no',
|
||||
'server_opts' => '',
|
||||
|
@ -144,6 +145,7 @@ my %DefaultConf = (
|
|||
'secondary_server_path' => '/var/spool/pandora/data_in',
|
||||
'secondary_server_port' => 41121,
|
||||
'secondary_transfer_mode' => 'tentacle',
|
||||
'secondary_server_user' => 'pandora',
|
||||
'secondary_server_pwd' => '',
|
||||
'secondary_server_ssl' => 'no',
|
||||
'secondary_server_opts' => '',
|
||||
|
@ -797,8 +799,8 @@ sub send_file {
|
|||
my $base = basename ($file);
|
||||
my $dir = dirname ($file);
|
||||
|
||||
$output = `ftp -n $Conf{'server_ip'} $Conf{'server_port'} 2>&1 >$DevNull <<FEOF1
|
||||
quote USER pandora
|
||||
$output = `ftp -n $Conf{'server_opts'} $Conf{'server_ip'} $Conf{'server_port'} 2>&1 >$DevNull <<FEOF1
|
||||
quote USER $Conf{'server_user'}
|
||||
quote PASS $Conf{'server_pwd'}
|
||||
lcd "$dir"
|
||||
cd "$Conf{'server_path'}"
|
||||
|
@ -851,6 +853,7 @@ sub swap_servers () {
|
|||
($Conf{'server_path'}, $Conf{'secondary_server_path'}) = ($Conf{'secondary_server_path'}, $Conf{'server_path'});
|
||||
($Conf{'server_port'}, $Conf{'secondary_server_port'}) = ($Conf{'secondary_server_port'}, $Conf{'server_port'});
|
||||
($Conf{'transfer_mode'}, $Conf{'secondary_transfer_mode'}) = ($Conf{'secondary_transfer_mode'}, $Conf{'transfer_mode'});
|
||||
($Conf{'server_user'}, $Conf{'secondary_server_user'}) = ($Conf{'secondary_server_user'}, $Conf{'server_user'});
|
||||
($Conf{'server_pwd'}, $Conf{'secondary_server_pwd'}) = ($Conf{'secondary_server_pwd'}, $Conf{'server_pwd'});
|
||||
($Conf{'server_ssl'}, $Conf{'secondary_server_ssl'}) = ($Conf{'secondary_server_ssl'}, $Conf{'server_ssl'});
|
||||
($Conf{'server_opts'}, $Conf{'secondary_server_opts'}) = ($Conf{'secondary_server_opts'}, $Conf{'server_opts'});
|
||||
|
@ -871,8 +874,8 @@ sub recv_file ($) {
|
|||
my $base = basename ($file);
|
||||
my $dir = dirname ($file);
|
||||
|
||||
$output = `ftp -n $Conf{'server_ip'} $Conf{'server_port'} 2>&1 >$DevNull <<FEOF1
|
||||
quote USER pandora
|
||||
$output = `ftp -n $Conf{'server_opts'} $Conf{'server_ip'} $Conf{'server_port'} 2>&1 >$DevNull <<FEOF1
|
||||
quote USER $Conf{'server_user'}
|
||||
quote PASS $Conf{'server_pwd'}
|
||||
lcd "$Conf{'temporal'}"
|
||||
cd "$Conf{'server_path'}"
|
||||
|
|
Loading…
Reference in New Issue