]> Frank Brehm's Git Trees - my-stuff/backup.git/commitdiff
Sinnvollen Anfang gefunden
authorFrank Brehm <frank@brehm-online.com>
Thu, 13 May 2010 07:59:28 +0000 (07:59 +0000)
committerFrank Brehm <frank@brehm-online.com>
Thu, 13 May 2010 07:59:28 +0000 (07:59 +0000)
bin/backup-per-ftp.pl
lib/FrBr/Backup/App.pm

index 68e1b663eb608b68e76e5771d64d426c092ed14e..a89f87a69b1113f04aae8748c2bf64483c60f9a1 100755 (executable)
@@ -17,17 +17,19 @@ use lib "$FindBin::Bin/../lib";
 #use FrBr::Backup::App;
 require FrBr::Backup::App;
 
-use version; our $VERSION = qv("0.0.1");
+use version; our $VERSION = qv("0.0.2");
 
 my $opts = {
-#    'progname' => 'backup-per-ftp',
+    'progname' => 'backup-per-ftp',
     'ftp_auto_login' => 0,
 };
 
 my $app = FrBr::Backup::App->new_with_options(%$opts);
 
-#exit($app->exit_code);
-exit 0;
+$app->run();
+
+exit($app->exit_code);
+#exit 0;
 
 
 #--------------------------------------------------------------------------------
index ef769ef5e5a988f0240b95591071e5c3a40774b9..acec40d7f12e6246843087d4e946636de475afb3 100644 (file)
@@ -131,6 +131,33 @@ sub BUILD {
 
 }
 
+#---------------------------------
+
+=head2 run( )
+
+Die eigentliche Startroutine der Anwendung.
+
+=cut
+
+sub run {
+
+    my $self = shift;
+
+    $self->info( "Verbinde mich FTP-Server ..." );
+
+    unless ( $self->init_ftp() ) {
+        $self->exit_code( 5 );
+        return;
+    }
+
+    unless ( $self->login_ftp() ) {
+        $self->exit_code( 6 );
+        return;
+    }
+
+    $self->info( "Beginne Backup." );
+
+}
 
 ###################################################################################