diff options
author | Simon Rettberg | 2016-01-14 17:43:02 +0100 |
---|---|---|
committer | Simon Rettberg | 2016-01-14 17:43:02 +0100 |
commit | 3578c2cdf4bba9a73d57a64941ebc2e4c931e555 (patch) | |
tree | 622e50e698663f288f6b7d9d51a610f23218a831 /dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/App.java | |
parent | [server] Remove stupid debug output (diff) | |
download | tutor-module-3578c2cdf4bba9a73d57a64941ebc2e4c931e555.tar.gz tutor-module-3578c2cdf4bba9a73d57a64941ebc2e4c931e555.tar.xz tutor-module-3578c2cdf4bba9a73d57a64941ebc2e4c931e555.zip |
[server] Add location support/filtering
Diffstat (limited to 'dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/App.java')
-rw-r--r-- | dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/App.java | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/App.java b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/App.java index 2d9e73c9..8e615ef1 100644 --- a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/App.java +++ b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/App.java @@ -3,6 +3,7 @@ package org.openslx.bwlp.sat; import java.io.IOException; import java.security.KeyManagementException; import java.security.NoSuchAlgorithmException; +import java.sql.SQLException; import java.util.HashSet; import java.util.Set; @@ -13,6 +14,7 @@ import org.apache.log4j.ConsoleAppender; import org.apache.log4j.Logger; import org.apache.log4j.PatternLayout; import org.apache.thrift.transport.TTransportException; +import org.openslx.bwlp.sat.database.Updater; import org.openslx.bwlp.sat.database.mappers.DbUser; import org.openslx.bwlp.sat.fileserv.FileServer; import org.openslx.bwlp.sat.maintenance.DeleteOldImages; @@ -40,8 +42,9 @@ public class App { public static void main(String[] args) throws TTransportException, NoSuchAlgorithmException, IOException, KeyManagementException { - //get going and show basic information in log file - BasicConfigurator.configure(new ConsoleAppender(new PatternLayout("%d %-5p [%t] %C{1} - %m%n"))); + // get going and show basic information in log file + // don't add date/time to log output - will be done by syslog + BasicConfigurator.configure(new ConsoleAppender(new PatternLayout("%-5p [%t] %C{1} - %m%n"))); if (args.length != 0 && args[0].equals("debug")) { DEBUG = true; } @@ -58,6 +61,14 @@ public class App { System.exit(1); } + // Update database schema if applicable + try { + Updater.updateDatabase(); + } catch (SQLException e1) { + LOGGER.fatal("Updating/checking the database layout failed."); + return; + } + if (Identity.loadCertificate() == null) { LOGGER.error("Could not set up TLS/SSL requirements, exiting"); System.exit(1); |