diff options
Diffstat (limited to 'src/main/java/org/openslx/imagemaster/App.java')
-rw-r--r-- | src/main/java/org/openslx/imagemaster/App.java | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/src/main/java/org/openslx/imagemaster/App.java b/src/main/java/org/openslx/imagemaster/App.java index 7f004fd..c2b36c0 100644 --- a/src/main/java/org/openslx/imagemaster/App.java +++ b/src/main/java/org/openslx/imagemaster/App.java @@ -5,10 +5,7 @@ import java.util.ArrayList; import java.util.List; import org.apache.log4j.Logger; -import org.openslx.imagemaster.Globals.PropInt; -import org.openslx.imagemaster.ftp.FtpCredentialsScheduler; -import org.openslx.imagemaster.ftp.ImageProcessor; -import org.openslx.imagemaster.ftp.MasterFtpServer; +import org.openslx.imagemaster.serverconnection.ImageProcessor; import org.openslx.imagemaster.thrift.server.BinaryListener; import org.slf4j.LoggerFactory; @@ -19,8 +16,6 @@ public class App private static List<Thread> servers = new ArrayList<>(); - public static final MasterFtpServer ftpServer = new MasterFtpServer(); - static { // TODO: // This is a temporary workaround for this annoying log4j error msg. @@ -35,7 +30,7 @@ public class App // Load properties try { - Globals.loadProperties(); // don't need to check return, because this should be the first time where props are loaded. + Globals.loadProperties(); if ( !Globals.propertiesValid() ) { log.error( "Config file contains errors." ); System.exit( 1 ); @@ -46,7 +41,6 @@ public class App } log.info( "Loaded config file" ); - log.info( "Checking !uploading! db entries." ); ImageProcessor.checkUploading(); // Create binary listener @@ -54,23 +48,7 @@ public class App t = new Thread( new BinaryListener(), "BinaryListener" ); servers.add( t ); t.start(); - - // Create Ftp Server - ftpServer.init( Globals.getPropertyInt( PropInt.FTPPORT ) ); // this init needs to be done, because we have to wait for the config file - Thread f; - f = new Thread( ftpServer, "FtpServer" ); - servers.add( f ); - f.start(); - - // add ftp users from database - ftpServer.addDbFtpUsers(); - // start FtpCredentialsScheduler - FtpCredentialsScheduler.startScheduling(); - - // testtesteset - ftpServer.addUser( "asdfasdfasdf", MasterFtpServer.Mode.DOWNLOADING, "windows7.vmdk" ); - // Run more servers // ... // Wait for all servers to die |