From 36c030fa027402b18e2f77027d407b04a867b4fc Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 12 Jan 2013 12:57:19 +1300 Subject: Release version 2.0 --- setup/linux/linux.cfg | 88 +++++++++++++++++++++++--------------------------- setup/linux/traccar.sh | 56 -------------------------------- 2 files changed, 40 insertions(+), 104 deletions(-) delete mode 100755 setup/linux/traccar.sh (limited to 'setup/linux') 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 @@ org.h2.Driver + org.h2.jdbcx.JdbcDataSource jdbc:h2:/opt/traccar/data/database sa @@ -13,59 +14,17 @@ 300 - - - 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); - - - id - Integer + id - Long imei - String <--> - SELECT id, imei + SELECT id, uniqueId as imei FROM devices; - imei - String - <--> - - INSERT INTO devices (imei) - VALUES (:imei); - - - - id - Integer - imei - String - <--> - - UPDATE devices - SET imei = :imei - WHERE id = :id; - - - - id - Integer - <--> - - DELETE FROM devices - WHERE id = :id; - - - - device_id - Integer - <--> - - SELECT * - FROM positions - WHERE device_id = :device_id - ORDER by time DESC; - - - - device_id - Integer + device_id - Long time - Date valid - Boolean latitude - Double @@ -76,13 +35,22 @@ extended_info - String (XML) <--> - 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); + + + + device_id - Long + id - Long + <--> + + UPDATE devices SET latestPosition_id = :id WHERE id = :device_id; true 8082 + /opt/traccar/traccar-web.war true @@ -183,5 +151,29 @@ true 5023 - + + + true + 5018 + + + true + 5019 + + + true + 5020 + + + true + 5021 + + + true + 5022 + + + true + 5023 + 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//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 - -- cgit v1.2.3