aboutsummaryrefslogtreecommitdiff
path: root/setup
diff options
context:
space:
mode:
authorYuriy Piskarev <yuriy.piskarev@gmail.com>2023-08-24 14:16:17 +0300
committerGitHub <noreply@github.com>2023-08-24 14:16:17 +0300
commitae406c7b49a72de24d81fd74386d9638342c90ee (patch)
tree6fbcf557375b98e926c78af9c757e62c79d72a1b /setup
parent56ff656c908b19feb2fa3dcffa48cc3bcdfe9b3b (diff)
parent9aeedc90da24848ff97227d6f281eb4d1e1506ef (diff)
downloadtrackermap-server-ae406c7b49a72de24d81fd74386d9638342c90ee.tar.gz
trackermap-server-ae406c7b49a72de24d81fd74386d9638342c90ee.tar.bz2
trackermap-server-ae406c7b49a72de24d81fd74386d9638342c90ee.zip
Merge branch 'traccar:master' into master
Diffstat (limited to 'setup')
-rw-r--r--setup/cloud-init.yaml29
-rw-r--r--setup/default.xml18
-rw-r--r--setup/environment.sh27
-rwxr-xr-xsetup/package.sh46
-rw-r--r--setup/traccar.iss2
5 files changed, 73 insertions, 49 deletions
diff --git a/setup/cloud-init.yaml b/setup/cloud-init.yaml
new file mode 100644
index 000000000..1246fb1b7
--- /dev/null
+++ b/setup/cloud-init.yaml
@@ -0,0 +1,29 @@
+#cloud-config
+
+write_files:
+ - content: |
+ <?xml version='1.0' encoding='UTF-8'?>
+ <!DOCTYPE properties SYSTEM 'http://java.sun.com/dtd/properties.dtd'>
+ <properties>
+
+ <entry key="config.default">./conf/default.xml</entry>
+
+ <entry key='database.driver'>com.mysql.jdbc.Driver</entry>
+ <entry key='database.url'>jdbc:mysql://localhost/traccar?zeroDateTimeBehavior=round&amp;serverTimezone=UTC&amp;allowPublicKeyRetrieval=true&amp;useSSL=false&amp;allowMultiQueries=true&amp;autoReconnect=true&amp;useUnicode=yes&amp;characterEncoding=UTF-8&amp;sessionVariables=sql_mode=''</entry>
+ <entry key='database.user'>root</entry>
+ <entry key='database.password'>root</entry>
+
+ </properties>
+ path: /root/traccar.xml
+
+package_update: true
+packages:
+ - unzip
+ - mysql-server
+
+runcmd:
+ - mysql -u root --execute="ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root'; GRANT ALL ON *.* TO 'root'@'localhost' WITH GRANT OPTION; FLUSH PRIVILEGES; CREATE DATABASE traccar;"
+ - wget https://www.traccar.org/download/traccar-linux-64-latest.zip
+ - unzip traccar-linux-*.zip && ./traccar.run
+ - cp /root/traccar.xml /opt/traccar/conf/
+ - service traccar start
diff --git a/setup/default.xml b/setup/default.xml
index 71e14f501..576bfcb6c 100644
--- a/setup/default.xml
+++ b/setup/default.xml
@@ -11,12 +11,12 @@
-->
<entry key='web.port'>8082</entry>
- <entry key='web.path'>./web</entry>
+ <entry key='web.path'>./modern</entry>
+ <entry key='web.sanitize'>false</entry>
<entry key='web.persistSession'>false</entry>
<entry key='geocoder.enable'>true</entry>
- <entry key='geocoder.type'>nominatim</entry>
- <entry key='geocoder.url'>https://us1.locationiq.com/v1/reverse.php</entry>
+ <entry key='geocoder.type'>locationiq</entry>
<entry key='geocoder.key'>pk.689d849289c8c63708068b2ff1f63b2d</entry>
<entry key='geocoder.onRequest'>true</entry>
<entry key='geocoder.ignorePositions'>true</entry>
@@ -29,12 +29,10 @@
<entry key='filter.future'>86400</entry>
<entry key='event.ignoreDuplicateAlerts'>true</entry>
- <entry key='processing.computedAttributes.enable'>true</entry>
- <entry key='processing.engineHours.enable'>true</entry>
<entry key='media.path'>./media</entry>
- <entry key='notificator.types'>web,mail</entry>
+ <entry key='notificator.types'>web,mail,command</entry>
<entry key='server.statistics'>https://www.traccar.org/analytics/</entry>
@@ -284,5 +282,13 @@
<entry key='armoli.port'>5238</entry>
<entry key='teratrack.port'>5239</entry>
<entry key='envotech.port'>5240</entry>
+ <entry key='bstpl.port'>5241</entry>
+ <entry key='thuraya.port'>5242</entry>
+ <entry key='ndtpv6.port'>5243</entry>
+ <entry key='g1rus.port'>5244</entry>
+ <entry key='rftrack.port'>5245</entry>
+ <entry key='vlt.port'>5246</entry>
+ <entry key='transync.port'>5247</entry>
+ <entry key='t622iridium.port'>5248</entry>
</properties>
diff --git a/setup/environment.sh b/setup/environment.sh
deleted file mode 100644
index 86a50cc85..000000000
--- a/setup/environment.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/env bash
-
-add-apt-repository ppa:openjdk-r/ppa
-curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
-dpkg --add-architecture i386
-apt update
-apt install -y git openjdk-11-jdk zip unzip innoextract wine wine32 makeself nodejs
-
-# /usr/bin/printf '\xfe\xed\xfe\xed\x00\x00\x00\x02\x00\x00\x00\x00\xe2\x68\x6e\x45\xfb\x43\xdf\xa4\xd9\x92\xdd\x41\xce\xb6\xb2\x1c\x63\x30\xd7\x92' > /etc/ssl/certs/java/cacerts
-# /var/lib/dpkg/info/ca-certificates-java.postinst configure
-
-git clone --recurse-submodules https://github.com/traccar/traccar.git
-(cd traccar/traccar-web && git checkout master)
-(cd traccar && ./gradlew build)
-
-wget http://cdn.sencha.com/cmd/7.1.0.15/no-jre/SenchaCmd-7.1.0.15-linux-i386.sh.zip
-unzip SenchaCmd-*.zip ; rm SenchaCmd-*.zip
-./SenchaCmd-*.sh -q ; rm SenchaCmd-*
-export PATH=$PATH:~/bin/Sencha/Cmd/
-
-(cd traccar/traccar-web && ./tools/package.sh)
-
-cd traccar/setup
-wget http://files.jrsoftware.org/is/5/isetup-5.5.6.exe
-wget https://github.com/ojdkbuild/ojdkbuild/releases/download/java-11-openjdk-11.0.13.8-1/java-11-openjdk-11.0.13.8-1.windows.ojdkbuild.x86_64.zip
-wget https://github.com/ojdkbuild/contrib_jdk11u-ci/releases/download/jdk-11.0.13%2B8/jdk-11.0.13-ojdkbuild-linux-x64.zip
-wget https://github.com/ojdkbuild/contrib_jdk11u-arm32-ci/releases/download/jdk-11.0.13%2B8/jdk-11.0.13-ojdkbuild-linux-armhf.zip
diff --git a/setup/package.sh b/setup/package.sh
index e5f976b79..f8ec927eb 100755
--- a/setup/package.sh
+++ b/setup/package.sh
@@ -15,6 +15,7 @@ usage () {
echo "Available platforms:"
echo " * linux-64"
echo " * linux-arm"
+ echo " * linux-arm64"
echo " * windows-64"
echo " * other"
exit 1
@@ -61,17 +62,20 @@ fi
if [ $PLATFORM = "all" -o $PLATFORM = "windows-64" ]; then
check_requirement "Inno Extractor" "which innoextract" "Missing innoextract binary"
check_requirement "Inno Setup" "ls i*setup-*.exe" "Missing Inno Setup (http://www.jrsoftware.org/isdl.php)"
- check_requirement "Windows 64 Java" "ls java-*.windows.ojdkbuild.x86_64.zip" "Missing Windows 64 Java (https://github.com/ojdkbuild/ojdkbuild)"
+ check_requirement "Windows 64 Java" "ls OpenJDK*64_windows*.zip" "Missing Windows 64 JDK (https://adoptium.net/)"
check_requirement "Wine" "which wine" "Missing wine binary"
fi
-if [ $PLATFORM = "all" -o $PLATFORM = "linux-64" -o $PLATFORM = "linux-arm" ]; then
+if [ $PLATFORM = "all" -o $PLATFORM = "linux-64" -o $PLATFORM = "linux-arm" -o $PLATFORM = "linux-arm64" ]; then
check_requirement "Makeself" "which makeself" "Missing makeself binary"
fi
if [ $PLATFORM = "all" -o $PLATFORM = "linux-64" ]; then
- check_requirement "Linux 64 Java" "ls jdk-*-linux-x64.zip" "Missing Linux 64 Java (https://github.com/ojdkbuild/contrib_jdk11u-ci/releases)"
+ check_requirement "Linux 64 Java" "ls OpenJDK*x64_linux*.tar.gz" "Missing Linux 64 JDK (https://adoptium.net/)"
fi
if [ $PLATFORM = "all" -o $PLATFORM = "linux-arm" ]; then
- check_requirement "Linux ARM Java" "ls jdk-*-linux-armhf.zip" "Missing Linux ARM Java (https://github.com/ojdkbuild/contrib_jdk11u-aarch32-ci/releases)"
+ check_requirement "Linux ARM Java" "ls OpenJDK*arm_linux*.tar.gz" "Missing Linux ARM JDK (https://adoptium.net/)"
+fi
+if [ $PLATFORM = "all" -o $PLATFORM = "linux-arm64" ]; then
+ check_requirement "Linux ARM 64 Java" "ls OpenJDK*aarch64_linux*.tar.gz" "Missing Linux ARM 64 JDK (https://adoptium.net/)"
fi
if [ $PREREQ = false ]; then
info "Missing build requirements, aborting..."
@@ -81,13 +85,14 @@ else
fi
prepare () {
- mkdir -p out/{conf,data,lib,logs,web,schema,templates}
+ mkdir -p out/{conf,data,lib,logs,legacy,modern,schema,templates}
cp ../target/tracker-server.jar out
cp ../target/lib/* out/lib
cp ../schema/* out/schema
cp -r ../templates/* out/templates
- cp -r ../traccar-web/web/* out/web
+ cp -r ../traccar-web/web/* out/legacy
+ cp -r ../traccar-web/modern/build/* out/modern
cp default.xml out/conf
cp traccar.xml out/conf
@@ -118,9 +123,9 @@ package_other () {
package_windows () {
info "Building Windows 64 installer"
- unzip -q -o java-*.windows.ojdkbuild.x86_64.zip
- jlink --module-path java-*.windows.ojdkbuild.x86_64/jmods --add-modules java.se,jdk.charsets,jdk.crypto.ec --output out/jre
- rm -rf java-*.windows.ojdkbuild.x86_64
+ unzip -q OpenJDK*64_windows*.zip
+ jlink --module-path jdk-*/jmods --add-modules java.se,jdk.charsets,jdk.crypto.ec,jdk.unsupported --output out/jre
+ rm -rf jdk-*
wine app/ISCC.exe traccar.iss >/dev/null
rm -rf out/jre
zip -q -j traccar-windows-64-$VERSION.zip Output/traccar-setup.exe README.txt
@@ -132,13 +137,13 @@ package_linux () {
cp setup.sh out
cp traccar.service out
- 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
+ tar -xf OpenJDK*$2_linux*.tar.gz
+ jlink --module-path jdk-*/jmods --add-modules java.se,jdk.charsets,jdk.crypto.ec,jdk.unsupported --output out/jre
+ rm -rf jdk-*
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
+ zip -q -j traccar-linux-$1-$VERSION.zip traccar.run README.txt
rm traccar.run
rm out/setup.sh
@@ -147,22 +152,29 @@ package_linux () {
package_linux_64 () {
info "Building Linux 64 installer"
- package_linux x64 64
+ package_linux 64 x64
ok "Created Linux 64 installer"
}
package_linux_arm () {
info "Building Linux ARM installer"
- package_linux armhf arm
+ package_linux arm arm
ok "Created Linux ARM installer"
}
+package_linux_arm64 () {
+ info "Building Linux ARM 64 installer"
+ package_linux arm64 aarch64
+ ok "Created Linux ARM 64 installer"
+}
+
prepare
case $PLATFORM in
all)
package_linux_64
package_linux_arm
+ package_linux_arm64
package_windows
package_other
;;
@@ -175,6 +187,10 @@ case $PLATFORM in
package_linux_arm
;;
+ linux-arm64)
+ package_linux_arm64
+ ;;
+
windows-64)
package_windows
;;
diff --git a/setup/traccar.iss b/setup/traccar.iss
index 3ffab1289..f9988a6f3 100644
--- a/setup/traccar.iss
+++ b/setup/traccar.iss
@@ -1,6 +1,6 @@
[Setup]
AppName=Traccar
-AppVersion=4.15
+AppVersion=5.8
DefaultDirName={pf}\Traccar
OutputBaseFilename=traccar-setup
ArchitecturesInstallIn64BitMode=x64