diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2012-05-06 08:56:39 +0000 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2012-05-06 08:56:39 +0000 |
commit | 131152712d834b39f44ae94ab5d2db04520d3125 (patch) | |
tree | 93a224f4cafba45d668153499a5d607382f46d9b /src/org/traccar/Server.java | |
parent | 0218464141fc64f060699c6e98ed5d4f0814e139 (diff) | |
download | trackermap-server-131152712d834b39f44ae94ab5d2db04520d3125.tar.gz trackermap-server-131152712d834b39f44ae94ab5d2db04520d3125.tar.bz2 trackermap-server-131152712d834b39f44ae94ab5d2db04520d3125.zip |
Diffstat (limited to 'src/org/traccar/Server.java')
-rw-r--r-- | src/org/traccar/Server.java | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/org/traccar/Server.java b/src/org/traccar/Server.java index fda5e6ad3..654d32321 100644 --- a/src/org/traccar/Server.java +++ b/src/org/traccar/Server.java @@ -86,15 +86,19 @@ public class Server { initAvl08Server(properties); // Initialize web server - Integer port = Integer.valueOf(properties.getProperty("http.port", "8082")); - webServer = new WebServer(port, dataManager); + if (Boolean.valueOf(properties.getProperty("http.enable"))) { + Integer port = Integer.valueOf(properties.getProperty("http.port", "8082")); + webServer = new WebServer(port, dataManager); + } } /** * Start */ public void start() { - webServer.start(); + if (webServer != null) { + webServer.start(); + } for (Object server: serverList) { ((TrackerServer) server).start(); } @@ -107,7 +111,9 @@ public class Server { for (Object server: serverList) { ((TrackerServer) server).stop(); } - webServer.stop(); + if (webServer != null) { + webServer.stop(); + } } /** |