summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/openslx/satellitedaemon/App.java
diff options
context:
space:
mode:
authorMichael Petretti2014-07-10 16:48:49 +0200
committerMichael Petretti2014-07-10 16:48:49 +0200
commitc4b51e6fd2b7e0fc3531cb43064f64e9d0d0b74e (patch)
treef1ca31217db6ef1521f07f9c132e5a6c4844b09f /src/main/java/org/openslx/satellitedaemon/App.java
parentMerge branch 'master' of git.openslx.org:bwlp/satellite-daemon (diff)
downloadsatellite-daemon-c4b51e6fd2b7e0fc3531cb43064f64e9d0d0b74e.tar.gz
satellite-daemon-c4b51e6fd2b7e0fc3531cb43064f64e9d0d0b74e.tar.xz
satellite-daemon-c4b51e6fd2b7e0fc3531cb43064f64e9d0d0b74e.zip
Fixed a lot of TODOs and upload works.
Diffstat (limited to 'src/main/java/org/openslx/satellitedaemon/App.java')
-rw-r--r--src/main/java/org/openslx/satellitedaemon/App.java16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/main/java/org/openslx/satellitedaemon/App.java b/src/main/java/org/openslx/satellitedaemon/App.java
index 7210c47..cd99ec0 100644
--- a/src/main/java/org/openslx/satellitedaemon/App.java
+++ b/src/main/java/org/openslx/satellitedaemon/App.java
@@ -1,21 +1,13 @@
package org.openslx.satellitedaemon;
-import java.io.FileNotFoundException;
import java.io.IOException;
-import java.security.InvalidKeyException;
-import java.security.KeyStoreException;
-import java.security.NoSuchAlgorithmException;
-import java.security.SignatureException;
-import java.security.UnrecoverableKeyException;
-import java.security.cert.CertificateException;
import org.apache.log4j.BasicConfigurator;
import org.apache.log4j.Logger;
-import org.openslx.imagemaster.thrift.iface.ServerAuthenticationException;
import org.openslx.satellitedaemon.ftp.FtpDownloadWorker;
import org.openslx.satellitedaemon.ftp.FtpUploadWorker;
-/**
+/***********************************************************************************************
* Main class for uploading images from the HS-Server to the Satellite Server.
*
*/
@@ -24,8 +16,6 @@ public class App
private static Logger log = Logger.getLogger( App.class );
public static void main( String[] args )
- throws NoSuchAlgorithmException, KeyStoreException, CertificateException, FileNotFoundException, IOException, ServerAuthenticationException, UnrecoverableKeyException,
- InvalidKeyException, SignatureException
{
BasicConfigurator.configure();
try {
@@ -38,6 +28,10 @@ public class App
log.error( "Could not load config file. Quitting." );
System.exit( 1 );
}
+ if (!Globals.masterServerSslContextInit()){
+ log.error( "Problem with initializing the SSLContext" );
+ System.exit( 1 );
+ }
Thread uploadWorker = new Thread( new FtpUploadWorker() );
uploadWorker.start();
Thread downloadWorker = new Thread( new FtpDownloadWorker() );