aboutsummaryrefslogtreecommitdiff
path: root/setup/linux
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2013-01-12 12:57:19 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2013-01-12 12:57:19 +1300
commit36c030fa027402b18e2f77027d407b04a867b4fc (patch)
tree1f5045328081f93688b9479b08bd58b1c2707a2a /setup/linux
parent900cbdd8b23cf0e9266523b21f2251510fcc1468 (diff)
downloadtrackermap-server-36c030fa027402b18e2f77027d407b04a867b4fc.tar.gz
trackermap-server-36c030fa027402b18e2f77027d407b04a867b4fc.tar.bz2
trackermap-server-36c030fa027402b18e2f77027d407b04a867b4fc.zip
Release version 2.0v2.0
Diffstat (limited to 'setup/linux')
-rw-r--r--setup/linux/linux.cfg88
-rwxr-xr-xsetup/linux/traccar.sh56
2 files changed, 40 insertions, 104 deletions
diff --git a/setup/linux/linux.cfg b/setup/linux/linux.cfg
index 6b60d5edc..16dc51e6f 100644
--- a/setup/linux/linux.cfg
+++ b/setup/linux/linux.cfg
@@ -6,6 +6,7 @@
<!-- Global confiduration -->
<entry key="database.driver">org.h2.Driver</entry>
+ <entry key="database.dataSource">org.h2.jdbcx.JdbcDataSource</entry>
<entry key="database.url">jdbc:h2:/opt/traccar/data/database</entry>
<entry key="database.user">sa</entry>
<entry key="database.password"></entry>
@@ -13,59 +14,17 @@
<!-- Database refresh delay in seconds -->
<entry key="database.refreshDelay">300</entry>
- <!-- Create database schema -->
- <entry key="database.initialize">
- CREATE TABLE IF NOT EXISTS devices (id INT IDENTITY, imei VARCHAR(16));
- CREATE TABLE IF NOT EXISTS positions (device_id INT, time TIMESTAMP, valid BOOLEAN, latitude DOUBLE, longitude DOUBLE, speed DOUBLE, course DOUBLE, power DOUBLE);
- </entry>
-
<!-->
- id - Integer
+ id - Long
imei - String
<-->
<entry key="database.selectDevice">
- SELECT id, imei
+ SELECT id, uniqueId as imei
FROM devices;
</entry>
<!-->
- imei - String
- <-->
- <entry key="database.insertDevice">
- INSERT INTO devices (imei)
- VALUES (:imei);
- </entry>
-
- <!-->
- id - Integer
- imei - String
- <-->
- <entry key="database.updateDevice">
- UPDATE devices
- SET imei = :imei
- WHERE id = :id;
- </entry>
-
- <!-->
- id - Integer
- <-->
- <entry key="database.deleteDevice">
- DELETE FROM devices
- WHERE id = :id;
- </entry>
-
- <!-->
- device_id - Integer
- <-->
- <entry key="database.selectPosition">
- SELECT *
- FROM positions
- WHERE device_id = :device_id
- ORDER by time DESC;
- </entry>
-
- <!-->
- device_id - Integer
+ device_id - Long
time - Date
valid - Boolean
latitude - Double
@@ -76,13 +35,22 @@
extended_info - String (XML)
<-->
<entry key="database.insertPosition">
- INSERT INTO positions (device_id, time, valid, latitude, longitude, speed, course, power)
- VALUES (:device_id, :time, :valid, :latitude, :longitude, :speed, :course, :power);
+ INSERT INTO positions (device_id, time, valid, latitude, longitude, altitude, speed, course, power)
+ VALUES (:device_id, :time, :valid, :latitude, :longitude, :altitude, :speed, :course, :power);
+ </entry>
+
+ <!-->
+ device_id - Long
+ id - Long
+ <-->
+ <entry key="database.updateLatestPosition">
+ UPDATE devices SET latestPosition_id = :id WHERE id = :device_id;
</entry>
<!-- Web interface port -->
<entry key="http.enable">true</entry>
<entry key="http.port">8082</entry>
+ <entry key="http.application">/opt/traccar/traccar-web.war</entry>
<!-- Logging options -->
<entry key="logger.enable">true</entry>
@@ -183,5 +151,29 @@
<!-- GT06 server configuration -->
<entry key="gt06.enable">true</entry>
<entry key="gt06.port">5023</entry>
-
+
+ <!-- TR20 server configuration -->
+ <entry key="tr20.enable">true</entry>
+ <entry key="tr20.port">5018</entry>
+
+ <!-- Navis server configuration -->
+ <entry key="navis.enable">true</entry>
+ <entry key="navis.port">5019</entry>
+
+ <!-- Meitrack server configuration -->
+ <entry key="meitrack.enable">true</entry>
+ <entry key="meitrack.port">5020</entry>
+
+ <!-- Skypatrol server configuration -->
+ <entry key="skypatrol.enable">true</entry>
+ <entry key="skypatrol.port">5021</entry>
+
+ <!-- GT02 server configuration -->
+ <entry key="gt02.enable">true</entry>
+ <entry key="gt02.port">5022</entry>
+
+ <!-- GT06 server configuration -->
+ <entry key="gt06.enable">true</entry>
+ <entry key="gt06.port">5023</entry>
+
</properties>
diff --git a/setup/linux/traccar.sh b/setup/linux/traccar.sh
deleted file mode 100755
index bcba7bb5a..000000000
--- a/setup/linux/traccar.sh
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/bin/sh
-
-app='/opt/traccar'
-
-tar -xzf wrapper-delta-pack-*.tar.gz
-mv wrapper-delta-pack-*/ wrapper/
-
-rm -rf out
-
-mkdir out
-mkdir out/bin
-mkdir out/conf
-mkdir out/data
-mkdir out/lib
-mkdir out/logs
-
-cp wrapper/src/bin/sh.script.in out/bin/traccar
-cp wrapper/lib/wrapper.jar out/lib
-cp wrapper/src/conf/wrapper.conf.in out/conf/wrapper.conf
-
-cp ../../target/tracker-server.jar out
-cp ../../target/lib/* out/lib
-cp linux.cfg out/conf
-
-sed -i 's/@app.name@/traccar/g' out/bin/traccar
-sed -i 's/@app.long.name@/traccar/g' out/bin/traccar
-
-sed -i '/wrapper.java.classpath.1/i\wrapper.java.classpath.2=../tracker-server.jar' out/conf/wrapper.conf
-sed -i "/wrapper.app.parameter.1/i\wrapper.app.parameter.2=$app/conf/linux.cfg" out/conf/wrapper.conf
-sed -i 's/<YourMainClass>/org.traccar.Main/g' out/conf/wrapper.conf
-sed -i 's/@app.name@/traccar/g' out/conf/wrapper.conf
-sed -i 's/@app.long.name@/traccar/g' out/conf/wrapper.conf
-sed -i 's/@app.description@/traccar/g' out/conf/wrapper.conf
-
-# linux 32
-
-cp wrapper/bin/wrapper-linux-x86-32 out/bin/wrapper
-cp wrapper/lib/libwrapper-linux-x86-32.so out/lib/libwrapper.so
-chmod +x out/bin/traccar
-
-makeself out traccar.run "traccar" "mkdir $app; cp -rf * $app; $app/bin/traccar install"
-zip traccar-linux-32.zip traccar.run README.txt
-
-# linux 64
-
-cp wrapper/bin/wrapper-linux-x86-64 out/bin/wrapper
-cp wrapper/lib/libwrapper-linux-x86-64.so out/lib/libwrapper.so
-chmod +x out/bin/traccar
-
-makeself out traccar.run "traccar" "mkdir $app; cp -rf * $app; $app/bin/traccar install"
-zip traccar-linux-64.zip traccar.run README.txt
-
-rm traccar.run
-rm -rf out
-rm -rf wrapper
-