aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/Server.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2012-05-06 08:56:39 +0000
committerAnton Tananaev <anton.tananaev@gmail.com>2012-05-06 08:56:39 +0000
commit131152712d834b39f44ae94ab5d2db04520d3125 (patch)
tree93a224f4cafba45d668153499a5d607382f46d9b /src/org/traccar/Server.java
parent0218464141fc64f060699c6e98ed5d4f0814e139 (diff)
downloadtrackermap-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.java14
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();
+ }
}
/**