aboutsummaryrefslogtreecommitdiff
path: root/setup
diff options
context:
space:
mode:
Diffstat (limited to 'setup')
-rw-r--r--setup/default.xml5
-rwxr-xr-xsetup/package.sh2
-rwxr-xr-xsetup/setup.sh12
-rw-r--r--setup/traccar.service2
4 files changed, 18 insertions, 3 deletions
diff --git a/setup/default.xml b/setup/default.xml
index 7e1572530..eb7b538ca 100644
--- a/setup/default.xml
+++ b/setup/default.xml
@@ -14,7 +14,6 @@
<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>
@@ -289,5 +288,9 @@
<entry key='wli.port'>5209</entry>
<entry key='niot.port'>5210</entry>
<entry key='portman.port'>5211</entry>
+ <entry key='moovbox.port'>5212</entry>
+ <entry key='futureway.port'>5213</entry>
+ <entry key='polte.port'>5214</entry>
+ <entry key='net.port'>5215</entry>
</properties>
diff --git a/setup/package.sh b/setup/package.sh
index 8014aca36..093db481b 100755
--- a/setup/package.sh
+++ b/setup/package.sh
@@ -145,7 +145,7 @@ package_linux () {
unzip -q -o jdk-*-linux-$1.zip
jlink --module-path jdk-*-linux-$1/jmods --add-modules java.se,jdk.charsets,jdk.crypto.ec --output out/jre
rm -rf jdk-*-linux-$1
- makeself --quiet --notemp out traccar.run "traccar" ./setup.sh
+ makeself --needroot --quiet --notemp out traccar.run "traccar" ./setup.sh
rm -rf out/jre
zip -q -j traccar-linux-$2-$VERSION.zip traccar.run README.txt
diff --git a/setup/setup.sh b/setup/setup.sh
index 7443c3b4e..1b07990ae 100755
--- a/setup/setup.sh
+++ b/setup/setup.sh
@@ -1,9 +1,21 @@
#!/bin/sh
+PRESERVECONFIG=0
+if [ -f /opt/traccar/conf/traccar.xml ]
+then
+ cp /opt/traccar/conf/traccar.xml /opt/traccar/conf/traccar.xml.saved
+ PRESERVECONFIG=1
+fi
+
mkdir -p /opt/traccar
cp -r * /opt/traccar
chmod -R go+rX /opt/traccar
+if [ ${PRESERVECONFIG} -eq 1 ] && [ -f /opt/traccar/conf/traccar.xml.saved ]
+then
+ mv -f /opt/traccar/conf/traccar.xml.saved /opt/traccar/conf/traccar.xml
+fi
+
mv /opt/traccar/traccar.service /etc/systemd/system
chmod 664 /etc/systemd/system/traccar.service
diff --git a/setup/traccar.service b/setup/traccar.service
index 4fb87a6cd..6c11ea1ea 100644
--- a/setup/traccar.service
+++ b/setup/traccar.service
@@ -8,7 +8,7 @@ WorkingDirectory=/opt/traccar
ExecStart=/opt/traccar/jre/bin/java -jar tracker-server.jar conf/traccar.xml
SyslogIdentifier=traccar
SuccessExitStatus=143
-WatchdogSec=300
+WatchdogSec=600
Restart=on-failure
RestartSec=10