aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/Main.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/Main.java')
-rw-r--r--src/org/traccar/Main.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/org/traccar/Main.java b/src/org/traccar/Main.java
index a51fa80bf..7c2e00ca0 100644
--- a/src/org/traccar/Main.java
+++ b/src/org/traccar/Main.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2012 - 2013 Anton Tananaev (anton.tananaev@gmail.com)
+ * Copyright 2012 - 2015 Anton Tananaev (anton.tananaev@gmail.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -33,12 +33,18 @@ public final class Main {
if (Context.getWebServer() != null) {
Context.getWebServer().start();
}
+ if (Context.getDatabaseConsole() != null) {
+ Context.getDatabaseConsole().start();
+ }
- // Shutdown server properly
Runtime.getRuntime().addShutdownHook(new Thread() {
@Override
public void run() {
Log.info("Shutting down server...");
+
+ if (Context.getDatabaseConsole() != null) {
+ Context.getDatabaseConsole().stop();
+ }
if (Context.getWebServer() != null) {
Context.getWebServer().stop();
}