aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/api/HealthCheckService.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2020-08-04 18:38:30 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2020-08-04 18:38:30 -0700
commitc686cfff8bbecd351ddc9c44724fafc3ac987dc2 (patch)
treeb0b6b29dc6f57a9658c5e21ae9164ecea8b28dc1 /src/main/java/org/traccar/api/HealthCheckService.java
parent18eea3995305cab6dab641f7d3dfd11b9a5433be (diff)
downloadtrackermap-server-c686cfff8bbecd351ddc9c44724fafc3ac987dc2.tar.gz
trackermap-server-c686cfff8bbecd351ddc9c44724fafc3ac987dc2.tar.bz2
trackermap-server-c686cfff8bbecd351ddc9c44724fafc3ac987dc2.zip
Option to disable health checks
Diffstat (limited to 'src/main/java/org/traccar/api/HealthCheckService.java')
-rw-r--r--src/main/java/org/traccar/api/HealthCheckService.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/api/HealthCheckService.java b/src/main/java/org/traccar/api/HealthCheckService.java
index 1e8f0d731..c9ce5a6c9 100644
--- a/src/main/java/org/traccar/api/HealthCheckService.java
+++ b/src/main/java/org/traccar/api/HealthCheckService.java
@@ -20,6 +20,7 @@ import com.sun.jna.Native;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.traccar.Context;
+import org.traccar.config.Keys;
import java.util.TimerTask;
@@ -33,7 +34,7 @@ public class HealthCheckService {
private long period;
public HealthCheckService() {
- if (Context.getConfig().getBoolean("web.healthCheck")
+ if (!Context.getConfig().getBoolean(Keys.WEB_DISABLE_HEALTH_CHECK)
&& System.getProperty("os.name").toLowerCase().startsWith("linux")) {
try {
systemD = Native.load("systemd", SystemD.class);