Bräuchte eure Hilfe bei einer änderung an dem programm reoback.pl und zwar möchtige ich folgende zeile so umschreiben das reoback bei einem nicht erfolgreichen FTP Login versuch nicht die Fehlermeldung "Unable to connect to remote host" ausgibt sondern einen erneuten connection versuch unternimmet:
print " Transferring archive: ".$fileName."...";
if ( $config{"rbackuptype"} eq "FTP" ) {
my $retry = 0;
do {
$retry++;
print "Try to connect #".$retry."n";
$ftp = Net::FTP->new( $config{"remotehost"}, Debug
} while ( (!$ftp) && ($retry < 10) );
if (!$ftp) warn ( " Unable to connect to remote host! : $!n" );
$ftp->login( $config{"ftpuser"},$config{"ftppasswd"} ) or
die ( "Unable to login to remote host! : $!n" );
$ftp->binary;
$ftp->mkdir( $remotePath, 1 ); # Create parent directories if necessary
$ftp->cwd( $remotePath ) or
die ( "Unable to change to remote directory! : $!n" );
/etc/reoback/settings.conf
syntax error at /usr/bin/reoback.pl line 224, near "Debug
}"
syntax error at /usr/bin/reoback.pl line 225, near ") warn"
Execution of /usr/bin/reoback.pl aborted due to compilation errors.
} while ( (!$ftp) && ($retry < 10) );
if (!$ftp) warn ( " Unable to connect to remote host! : $!n" );