aboutsummaryrefslogtreecommitdiff
path: root/setup
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2020-02-22 16:59:43 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2020-02-22 16:59:43 -0800
commit8d6e45331cb4ba86faaabfe7d1f9e7ccfd6e824d (patch)
treef6dcc78348c96a2785685dac603b5058304b62f6 /setup
parentdeb519ebd6798450509afaf4067e140edd7eb0d0 (diff)
downloadtraccar-server-8d6e45331cb4ba86faaabfe7d1f9e7ccfd6e824d.tar.gz
traccar-server-8d6e45331cb4ba86faaabfe7d1f9e7ccfd6e824d.tar.bz2
traccar-server-8d6e45331cb4ba86faaabfe7d1f9e7ccfd6e824d.zip
Support health monitoring
Diffstat (limited to 'setup')
-rw-r--r--setup/default.xml1
-rw-r--r--setup/traccar.service3
2 files changed, 4 insertions, 0 deletions
diff --git a/setup/default.xml b/setup/default.xml
index 1d82ad926..561b57a57 100644
--- a/setup/default.xml
+++ b/setup/default.xml
@@ -14,6 +14,7 @@
<entry key='web.port'>8082</entry>
<entry key='web.path'>./web</entry>
<entry key='web.cacheControl'>max-age=3600,public</entry>
+ <entry key='web.healthCheck'>true</entry>
<entry key='geocoder.enable'>false</entry>
<entry key='geocoder.type'>google</entry>
diff --git a/setup/traccar.service b/setup/traccar.service
index fe746dda8..6ae24ab8a 100644
--- a/setup/traccar.service
+++ b/setup/traccar.service
@@ -8,6 +8,9 @@ WorkingDirectory=/opt/traccar
ExecStart=/opt/traccar/jre/bin/java -jar tracker-server.jar conf/traccar.xml
SyslogIdentifier=traccar
SuccessExitStatus=143
+WatchdogSec=100
+Restart=on-failure
+RestartSec=10
[Install]
WantedBy=multi-user.target