mirror of
https://github.com/thetechprepper/emcomm-tools-os-community.git
synced 2026-09-17 15:41:44 -04:00
Merge pull request #42 from thetechprepper/feature/et-aircraft
Merge feature/et-aircraft to R5 branch
This commit is contained in:
+1
@@ -0,0 +1 @@
|
|||||||
|
../et-service-et-api.service
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
../et-service-mbtileserver.service
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
# Author : Gaston Gonzalez
|
||||||
|
# Date : 7 June 2025
|
||||||
|
# Purpose : User systemd unit file for EmComm Tools dump1090 service
|
||||||
|
#
|
||||||
|
# Usage:
|
||||||
|
# Check status : systemctl --user status et-service-dump1090
|
||||||
|
# Start service : systemctl --user start et-service-dump1090
|
||||||
|
# Stop service : systemctl --user stop et-service-dump1090
|
||||||
|
# Reload this config : systemctl --user daemon-reload
|
||||||
|
|
||||||
|
[Unit]
|
||||||
|
Description=EmComm Tools dump1090 service
|
||||||
|
# Disable conditional check for SDR device. Allow et-dump1090 to enforce.
|
||||||
|
#ConditionPathExists=/dev/et-sdr
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/opt/emcomm-tools/bin/et-dump1090
|
||||||
|
Restart=no
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
# Author : Gaston Gonzalez
|
||||||
|
# Date : 13 August 2025
|
||||||
|
# Purpose : User systemd unit file for EmComm Tools API
|
||||||
|
#
|
||||||
|
# Usage:
|
||||||
|
# Check status : systemctl --user status et-service-et-api
|
||||||
|
# Start service : systemctl --user start et-service-et-api
|
||||||
|
# Stop service : systemctl --user stop et-service-et-api
|
||||||
|
# Reload this config : systemctl --user daemon-reload
|
||||||
|
|
||||||
|
[Unit]
|
||||||
|
Description=EmComm Tools API
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/opt/emcomm-tools-api/bin/et-api
|
||||||
|
Restart=always
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
# Author : Gaston Gonzalez
|
||||||
|
# Date : 5 July 2025
|
||||||
|
# Purpose : User systemd unit file for EmComm Tools raster tile service
|
||||||
|
#
|
||||||
|
# Usage:
|
||||||
|
# Check status : systemctl --user status et-service-mbtileservice
|
||||||
|
# Start service : systemctl --user start et-service-mbtileservice
|
||||||
|
# Stop service : systemctl --user stop et-service-mbtileservice
|
||||||
|
# Reload this config : systemctl --user daemon-reload
|
||||||
|
|
||||||
|
[Unit]
|
||||||
|
Description=EmComm Tools raster tile service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/opt/emcomm-tools/bin/et-mbtileserver
|
||||||
|
Restart=always
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Copy your `.mbtiles` file here.
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# Author : Gaston Gonzalez
|
||||||
|
# Date : 7 June 2025
|
||||||
|
# Purpose : udev rules for supported SDRs
|
||||||
|
#
|
||||||
|
# Supported Devices
|
||||||
|
# 1. RTL-SDR Blog v2
|
||||||
|
#
|
||||||
|
# Preconditions:
|
||||||
|
# 1. SDR connected via USB cable
|
||||||
|
#
|
||||||
|
# Postconditions:
|
||||||
|
# 1. /dev/et-sdr created
|
||||||
|
|
||||||
|
KERNEL=="swradio0", \
|
||||||
|
GROUP="dialout", MODE="0660", SYMLINK+="et-sdr"
|
||||||
@@ -2,45 +2,38 @@
|
|||||||
#
|
#
|
||||||
# Author : Gaston Gonzalez
|
# Author : Gaston Gonzalez
|
||||||
# Date : 4 June 2025
|
# Date : 4 June 2025
|
||||||
# Update : 5 June 2025
|
# Update : 8 July 2025
|
||||||
# Purpose : Wrapper script around dump1090
|
# Purpose : Wrapper script around ADS-B integration
|
||||||
#
|
#
|
||||||
# Preconditions:
|
# Preconditions:
|
||||||
# 1. RTL-SDR is connected and detected
|
# 1. RTL-SDR v2 is connected and detected
|
||||||
#
|
#
|
||||||
# Postconditions:
|
# Postconditions:
|
||||||
# 1. dump1099 is launched
|
# 1. dump1099 systemd service is launched
|
||||||
# 2. A map is launched
|
# 2. et-aircraft-app launched
|
||||||
|
|
||||||
# TODO: Check for RTL-SDR device
|
|
||||||
# TODO: Add a systemd user service to start dump1090
|
|
||||||
# TODO: Use local offline map
|
|
||||||
# TODO: Move map to current position
|
|
||||||
# TODO: Use icon and add to launcher
|
|
||||||
|
|
||||||
source /opt/emcomm-tools/bin/et-common
|
source /opt/emcomm-tools/bin/et-common
|
||||||
|
|
||||||
DUMP1090_CONF_DIR="${HOME}/.local/share/emcomm-tools/dump1090"
|
CLEAN_UP=1
|
||||||
DUMP1090_MAP_HTML="${DUMP1090_CONF_DIR}/gmap.html"
|
|
||||||
|
|
||||||
if [[ ! -e ${DUMP1090_MAP_HTML} ]]; then
|
cleanup() {
|
||||||
et-log "Map HTML not found: ${DUMP1090_MAP_HTML}"
|
if [[ ${CLEAN_UP} -eq 1 ]]; then
|
||||||
notify-user "Map HTML not found: ${DUMP1090_MAP_HTML}"
|
et-log "Stopping dump1099 service"
|
||||||
|
systemctl --user stop et-service-dump1090
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Stop dump1099 on exit
|
||||||
|
trap cleanup EXIT
|
||||||
|
|
||||||
|
if [[ ! -e ${ET_DEVICE_SDR} ]]; then
|
||||||
|
notify-user "No ${ET_DEVICE_SDR} detected. Reconnect your SDR."
|
||||||
|
CLEAN_UP=0
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CWD_DIR=$(pwd)
|
systemctl --user restart et-service-dump1090
|
||||||
|
if [[ $? -eq 0 ]]; then
|
||||||
cd ${DUMP1090_CONF_DIR}
|
start_and_wait_for_service et-service-dump1090
|
||||||
|
et-aircraft-app
|
||||||
# replace with systemd
|
|
||||||
CMD="dump1090 --net --net-http-port 1090"
|
|
||||||
et-log "Starting dump1090 in ${DUMP1090_CONF_DIR} with: ${CMD}"
|
|
||||||
|
|
||||||
${CMD}
|
|
||||||
|
|
||||||
if [[ $? -ne 0 ]]; then
|
|
||||||
notify-user "RTL-SDR not detected. Please connect it and retry."
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd ${CWD_DIR}
|
|
||||||
|
|||||||
@@ -1,9 +1,15 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Author : Gaston Gonzalez
|
# Author : Gaston Gonzalez
|
||||||
# Date : 1 February 2025
|
# Date : 1 February 2025
|
||||||
# Updated : 5 June 2025
|
# Updated : 7 June 2025
|
||||||
# Purpose : Common environment variables and functions
|
# Purpose : Common environment variables and functions
|
||||||
|
|
||||||
|
# Standardized device paths for supported hardware
|
||||||
|
export ET_DEVICE_AUDIO="/dev/et-audio"
|
||||||
|
export ET_DEVICE_CAT="/dev/et-cat"
|
||||||
|
export ET_DEVICE_GPS="/dev/et-gps"
|
||||||
|
export ET_DEVICE_SDR="/dev/et-sdr"
|
||||||
|
|
||||||
export ESC="\x1B"
|
export ESC="\x1B"
|
||||||
export RED="${ESC}[1;31m"
|
export RED="${ESC}[1;31m"
|
||||||
export BLUE="${ESC}[1;34m"
|
export BLUE="${ESC}[1;34m"
|
||||||
@@ -22,3 +28,49 @@ show-err-dialog() {
|
|||||||
notify-user() {
|
notify-user() {
|
||||||
notify-send -t 5000 --app-name="EmComm Tools" "$1"
|
notify-send -t 5000 --app-name="EmComm Tools" "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
exit_if_no_sdr() {
|
||||||
|
if [[ ! -e ${ET_DEVICE_SDR} ]]; then
|
||||||
|
et-log "No ${ET_DEVICE_SDR} detected."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
exit_on_service_failure() {
|
||||||
|
local systemd_unit_name="$1"
|
||||||
|
systemctl is-active --user --quiet "${systemd_unit_name}"
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
et-log "Can't start mode. ${systemd_unit_name} failed to start."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
start_and_wait_for_service() {
|
||||||
|
local timeout=15 # Total time to wait in seconds
|
||||||
|
local interval=2 # Interval between checks in seconds
|
||||||
|
local systemd_unit_name="$1"
|
||||||
|
local elapsed=0
|
||||||
|
|
||||||
|
et-log "Starting ${systemd_unit_name}..."
|
||||||
|
systemctl --user start ${systemd_unit_name}
|
||||||
|
|
||||||
|
et-log "Waiting for ${systemd_unit_name} to become active..."
|
||||||
|
|
||||||
|
while ! systemctl is-active --user --quiet "${systemd_unit_name}"; do
|
||||||
|
sleep "$interval"
|
||||||
|
elapsed=$((elapsed + interval))
|
||||||
|
if [ "$elapsed" -ge "$timeout" ]; then
|
||||||
|
et-log "Timeout reached. ${systemd_unit_name} failed to start."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
et-log "Waiting for ${systemd_unit_name} to become active..."
|
||||||
|
done
|
||||||
|
|
||||||
|
# Some applications even when started still need a bit of extra time to be available.
|
||||||
|
# Add a short think time of 2 seconds. The ARDOP modem requies extra time.
|
||||||
|
sleep 2
|
||||||
|
|
||||||
|
# Do one more check to ensure that we are running, otherwise exit.
|
||||||
|
exit_on_service_failure ${systemd_unit_name}
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
Executable
+55
@@ -0,0 +1,55 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Author : Gaston Gonzalez
|
||||||
|
# Date : 7 June 2025
|
||||||
|
# Purpose : Wrapper script around dump1090
|
||||||
|
#
|
||||||
|
# Preconditions:
|
||||||
|
# 1. RTL-SDR v2 is connected and detected
|
||||||
|
#
|
||||||
|
# Postconditions:
|
||||||
|
# 1. dump1099 map is updated with your position if available
|
||||||
|
# 2. dump1099 is launched with network and HTTP server support
|
||||||
|
|
||||||
|
source /opt/emcomm-tools/bin/et-common
|
||||||
|
|
||||||
|
DUMP1090_CONF_DIR="${HOME}/.local/share/emcomm-tools/dump1090"
|
||||||
|
DUMP1090_MAP_HTML="${DUMP1090_CONF_DIR}/gmap.html"
|
||||||
|
|
||||||
|
exit_if_no_sdr
|
||||||
|
|
||||||
|
if [[ ! -e ${DUMP1090_MAP_HTML} ]]; then
|
||||||
|
et-log "Map HTML not found: ${DUMP1090_MAP_HTML}"
|
||||||
|
notify-user "Map HTML not found: ${DUMP1090_MAP_HTML}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
CWD_DIR=$(pwd)
|
||||||
|
|
||||||
|
cd ${DUMP1090_CONF_DIR}
|
||||||
|
|
||||||
|
MY_LAT_LON=$(et-system-info et-gps)
|
||||||
|
if [[ $? -eq 0 ]]; then
|
||||||
|
if echo "${MY_LAT_LON}" | grep -Eq '^[-+]?[0-9]+(\.[0-9]+)?\s*,\s*[-+]?[0-9]+(\.[0-9]+)?$'; then
|
||||||
|
LAT=$(echo ${MY_LAT_LON} | cut -d "," -f1)
|
||||||
|
LON=$(echo ${MY_LAT_LON} | cut -d "," -f2)
|
||||||
|
ZOOM=10
|
||||||
|
|
||||||
|
sed -i "s/CenterLat=[^;]*;/CenterLat=${LAT};/g" ${DUMP1090_MAP_HTML}
|
||||||
|
sed -i "s/CenterLon=[^;]*;/CenterLon=${LON};/g" ${DUMP1090_MAP_HTML}
|
||||||
|
sed -i "s/setView(\[.*\], *[0-9]*);/setView([${LAT}, ${LON}], ${ZOOM});/" ${DUMP1090_MAP_HTML}
|
||||||
|
|
||||||
|
et-log "Updated map center with your current location."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
CMD="dump1090 --net --net-http-port 1090"
|
||||||
|
et-log "Starting dump1090 in ${DUMP1090_CONF_DIR} with: ${CMD}"
|
||||||
|
|
||||||
|
${CMD}
|
||||||
|
|
||||||
|
if [[ $? -ne 0 ]]; then
|
||||||
|
et-log "Error starting dump1090."
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd ${CWD_DIR}
|
||||||
Executable
+40
@@ -0,0 +1,40 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Author : Gaston Gonzalez
|
||||||
|
# Date : 5 July 2025
|
||||||
|
# Purpose : Wrapper script for starting the raster tile server
|
||||||
|
#
|
||||||
|
# Preconditions:
|
||||||
|
# 1. At least one .mbtiles files exist in the tileset directory
|
||||||
|
#
|
||||||
|
# Postconditions:
|
||||||
|
# 1. mbtileserver is started
|
||||||
|
# 2. Tile server available at http://localhost:8000/services
|
||||||
|
|
||||||
|
TILESERVER_HOME="${HOME}/.local/share/emcomm-tools/mbtileserver"
|
||||||
|
TILESERVER_TILE_DIR="${TILESERVER_HOME}/tilesets"
|
||||||
|
|
||||||
|
start() {
|
||||||
|
CWD_DIR=$(pwd)
|
||||||
|
|
||||||
|
cd ${TILESERVER_HOME}
|
||||||
|
CMD="mbtileserver"
|
||||||
|
et-log "Starting raster tile server in ${TILESERVER_HOME} with: ${CMD}"
|
||||||
|
|
||||||
|
${CMD}
|
||||||
|
|
||||||
|
cd ${CWD_DIR}
|
||||||
|
}
|
||||||
|
|
||||||
|
if [[ ! -e ${TILESERVER_TILE_DIR} ]]; then
|
||||||
|
et-log "Tile set directory does not exist: ${TILESERVER_TILE_DIR}."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
ls ${TILESERVER_TILE_DIR}/*.mbtiles
|
||||||
|
if [[ $? -ne 0 ]]; then
|
||||||
|
et-log "Can't start tile server. No .mbtiles in ${TILESERVER_TILE_DIR}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
start
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Name=et-aircraft
|
||||||
|
Comment=dump1090 ADB-S tracker for EmComm Tools
|
||||||
|
Exec=/opt/emcomm-tools/bin/et-aircraft
|
||||||
|
Icon=et-aircraft-icon-black-192
|
||||||
|
Terminal=false
|
||||||
|
X-MultipleArgs=false
|
||||||
|
Type=Application
|
||||||
|
Categories=HamRadio;
|
||||||
|
StartupNotify=true
|
||||||
@@ -12,7 +12,7 @@ show-desktop-icons = false
|
|||||||
picture-uri = 'file:///usr/share/backgrounds/emcomm-tools-wallpaper.png'
|
picture-uri = 'file:///usr/share/backgrounds/emcomm-tools-wallpaper.png'
|
||||||
|
|
||||||
[org.gnome.shell]
|
[org.gnome.shell]
|
||||||
favorite-apps = ['emcomm-tools.desktop', 'js8call.desktop', 'org.gnome.Terminal.desktop', 'navit.desktop', 'min.desktop', 'org.gnome.Nautilus.desktop']
|
favorite-apps = ['emcomm-tools.desktop', 'js8call.desktop', 'et-aircraft.desktop', 'org.gnome.Terminal.desktop', 'navit.desktop', 'min.desktop', 'org.gnome.Nautilus.desktop']
|
||||||
last-selected-power-profile = 'performance'
|
last-selected-power-profile = 'performance'
|
||||||
|
|
||||||
[org.gnome.system.location]
|
[org.gnome.system.location]
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 1017 KiB |
@@ -2,17 +2,17 @@
|
|||||||
#
|
#
|
||||||
# Author : Gaston Gonzalez
|
# Author : Gaston Gonzalez
|
||||||
# Date : 16 March 2024
|
# Date : 16 March 2024
|
||||||
# Updated : 9 October 2024
|
# Updated : 8 June 2025
|
||||||
# Purpose : Configure GNOME
|
# Purpose : Configure GNOME
|
||||||
|
|
||||||
et-log "Configuring GNOME"
|
et-log "Configuring GNOME..."
|
||||||
|
|
||||||
cp ../overlay/usr/share/glib-2.0/schemas/90_ubuntu-settings.gschema.override \
|
cp ../overlay/usr/share/glib-2.0/schemas/90_ubuntu-settings.gschema.override \
|
||||||
/usr/share/glib-2.0/schemas/
|
/usr/share/glib-2.0/schemas/
|
||||||
|
|
||||||
cp ../overlay/usr/share/icons/emcomm-tools-icon-black-512.png \
|
cp ../overlay/usr/share/icons/*.png \
|
||||||
/usr/share/icons/
|
/usr/share/icons/
|
||||||
chmod 644 /usr/share/icons/emcomm-tools-*.png
|
chmod 644 /usr/share/icons/et-*.png
|
||||||
|
|
||||||
glib-compile-schemas /usr/share/glib-2.0/schemas/
|
glib-compile-schemas /usr/share/glib-2.0/schemas/
|
||||||
|
|
||||||
|
|||||||
Executable
+31
@@ -0,0 +1,31 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Author : Gaston Gonzalez
|
||||||
|
# Date : 6 July 2025
|
||||||
|
# Purpose : Downloads pre-rendered raster map tiles in mbtile format
|
||||||
|
|
||||||
|
BASE_URL="https://github.com/thetechprepper/emcomm-tools-os-community/releases/download"
|
||||||
|
RELEASE="emcomm-tools-os-community-20250401-r4-final-4.0.0"
|
||||||
|
TILESET_DIR="/etc/skel/.local/share/emcomm-tools/mbtileserver/tilesets"
|
||||||
|
|
||||||
|
OPTIONS=(
|
||||||
|
"us" "United States"
|
||||||
|
"ca" "Canada"
|
||||||
|
)
|
||||||
|
|
||||||
|
SELECTED_COUNTRY=$(dialog --clear --menu "Select a country" 15 40 5 "${OPTIONS[@]}" 2>&1 >/dev/tty)
|
||||||
|
EXIT_STATUS=$?
|
||||||
|
|
||||||
|
tput sgr 0 && clear
|
||||||
|
|
||||||
|
if [[ $EXIT_STATUS -eq 0 ]]; then
|
||||||
|
DOWNLOAD_FILE="osm-${SELECTED_COUNTRY}-zoom0to10-20250703.mbtiles"
|
||||||
|
DOWNLOAD_URL="${BASE_URL}/${RELEASE}/${DOWNLOAD_FILE}"
|
||||||
|
|
||||||
|
if [[ ! -e ${DOWNLOAD_FILE} ]]; then
|
||||||
|
et-log "Downloading ${DOWNLOAD_URL}"
|
||||||
|
curl -L -f -o ${DOWNLOAD_FILE} ${DOWNLOAD_URL}
|
||||||
|
fi
|
||||||
|
|
||||||
|
et-log "Moving ${DOWNLOAD_FILE} ${TILESET_DIR}"
|
||||||
|
mv -v ${DOWNLOAD_FILE} ${TILESET_DIR}
|
||||||
|
fi
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Author : Gaston Gonzalez
|
# Author : Gaston Gonzalez
|
||||||
# Date : 4 June 2025
|
# Date : 4 June 2025
|
||||||
# Updated : 5 June 2025
|
# Updated : 6 July 2025
|
||||||
# Purpose : Install dump1090 (ADB-S aircraft tracking)
|
# Purpose : Install dump1090 (ADB-S aircraft tracking)
|
||||||
set -e
|
set -e
|
||||||
trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG
|
trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG
|
||||||
@@ -20,7 +20,7 @@ DUMP1090_CONF_DIR="/etc/skel/.local/share/emcomm-tools/dump1090"
|
|||||||
|
|
||||||
if [[ ! -e ${ET_DIST_DIR}/${DOWNLOAD_FILE} ]]; then
|
if [[ ! -e ${ET_DIST_DIR}/${DOWNLOAD_FILE} ]]; then
|
||||||
|
|
||||||
URL="https://github.com/antirez/dump1090/archive/refs/heads/master.zip"
|
URL="https://github.com/thetechprepper/dump1090/archive/refs/heads/master.zip"
|
||||||
|
|
||||||
et-log "Downloading ${APP}: ${URL}"
|
et-log "Downloading ${APP}: ${URL}"
|
||||||
curl -s -L -o ${DOWNLOAD_FILE} --fail ${URL}
|
curl -s -L -o ${DOWNLOAD_FILE} --fail ${URL}
|
||||||
@@ -54,3 +54,7 @@ ln -s ${INSTALL_DIR} ${LINK_PATH}
|
|||||||
stow -v -d /opt ${APP} -t /usr/local
|
stow -v -d /opt ${APP} -t /usr/local
|
||||||
|
|
||||||
cd $CWD_DIR
|
cd $CWD_DIR
|
||||||
|
|
||||||
|
et-log "Updating launcher icon to support PNP..."
|
||||||
|
cp -v ../overlay/usr/share/applications/et-aircraft.desktop /usr/share/applications/
|
||||||
|
|
||||||
|
|||||||
Executable
+27
@@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Author : Gaston Gonzalez
|
||||||
|
# Date : 9 July 2025
|
||||||
|
# Purpose : Install et-aircraft-app
|
||||||
|
set -e
|
||||||
|
trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG
|
||||||
|
trap 'et-log "\"${last_command}\" command failed with exit code $?."' ERR
|
||||||
|
|
||||||
|
. ./env.sh
|
||||||
|
|
||||||
|
APP=et-aircraft-app
|
||||||
|
VERSION=1.0.0
|
||||||
|
DOWNLOAD_FILE="${APP}_${VERSION}_amd64.deb"
|
||||||
|
|
||||||
|
et-log "Installing ${APP} ${VERSION}..."
|
||||||
|
|
||||||
|
if [[ ! -e ${ET_DIST_DIR}/${DOWNLOAD_FILE} ]]; then
|
||||||
|
|
||||||
|
URL="https://github.com/thetechprepper/et-aircraft-app/releases/download/${VERSION}/${DOWNLOAD_FILE}"
|
||||||
|
|
||||||
|
et-log "Downloading ${APP}: ${URL}"
|
||||||
|
curl -s -L -o ${DOWNLOAD_FILE} --fail ${URL}
|
||||||
|
|
||||||
|
mv ${DOWNLOAD_FILE} ${ET_DIST_DIR}
|
||||||
|
fi
|
||||||
|
|
||||||
|
DEBIAN_FRONTEND=noninteractive dpkg -i "${ET_DIST_DIR}/${DOWNLOAD_FILE}"
|
||||||
Executable
+43
@@ -0,0 +1,43 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Author : Gaston Gonzalez
|
||||||
|
# Date : 13 August 2025
|
||||||
|
# Purpose : Install EmComm Tools API
|
||||||
|
set -e
|
||||||
|
trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG
|
||||||
|
trap 'et-log "\"${last_command}\" command failed with exit code $?."' ERR
|
||||||
|
|
||||||
|
. ./env.sh
|
||||||
|
|
||||||
|
APP=et-api
|
||||||
|
VERSION=1.0.0
|
||||||
|
ET_API_JAR="emcomm-tools-api-${VERSION}-SNAPSHOT.jar"
|
||||||
|
BASE_URL="https://github.com/thetechprepper/et-api-java/releases/download/${VERSION}"
|
||||||
|
|
||||||
|
INSTALL_DIR="/opt/emcomm-tools-api"
|
||||||
|
BIN_DIR="${INSTALL_DIR}/bin"
|
||||||
|
DATA_DIR="${INSTALL_DIR}/data"
|
||||||
|
INDEX_DIR="${INSTALL_DIR}/index"
|
||||||
|
|
||||||
|
et-log "Installing ${APP} ${VERSION}..."
|
||||||
|
|
||||||
|
mkdir -v -p "${BIN_DIR}" "${DATA_DIR}" "${INDEX_DIR}"
|
||||||
|
|
||||||
|
# Download and install et-api uber JAR
|
||||||
|
URL="${BASE_URL}/${ET_API_JAR}"
|
||||||
|
et-log "Downloading ${APP}: ${URL}"
|
||||||
|
curl -s -L -o "${BIN_DIR}/${APP}" --fail ${URL}
|
||||||
|
chmod 755 "${BIN_DIR}/${APP}"
|
||||||
|
|
||||||
|
# Download pre-built data sets
|
||||||
|
FILES=("faa.csv" "license.csv" "zip2geo.csv" "zip2geo-elevation.csv")
|
||||||
|
for file in "${FILES[@]}"; do
|
||||||
|
URL="${BASE_URL}/${file}"
|
||||||
|
|
||||||
|
et-log "Downloading data set: ${URL}"
|
||||||
|
curl -s -L -o "${DATA_DIR}/${file}" --fail ${URL}
|
||||||
|
done
|
||||||
|
|
||||||
|
et-log "Applying permissions..."
|
||||||
|
chgrp -v -R ${ET_GROUP} ${DATA_DIR} ${INDEX_DIR}
|
||||||
|
chmod -v 775 ${DATA_DIR} ${INDEX_DIR}
|
||||||
|
chmod -v 664 ${DATA_DIR}/*.csv
|
||||||
+7
-1
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# Author : Gaston Gonzalez
|
# Author : Gaston Gonzalez
|
||||||
# Date : 16 March 2024
|
# Date : 16 March 2024
|
||||||
# Updated : 4 June 2025
|
# Updated : 9 July 2025
|
||||||
# Purpose : Main installer for EmComm Tools Community (ETC)
|
# Purpose : Main installer for EmComm Tools Community (ETC)
|
||||||
|
|
||||||
. ./env.sh
|
. ./env.sh
|
||||||
@@ -73,3 +73,9 @@ exitIfNotRoot
|
|||||||
# Install SDR tools
|
# Install SDR tools
|
||||||
./install-sdr-tools.sh
|
./install-sdr-tools.sh
|
||||||
./install-dump1090.sh
|
./install-dump1090.sh
|
||||||
|
|
||||||
|
# Install ETC custom maps
|
||||||
|
./download-et-maps.sh
|
||||||
|
|
||||||
|
# Install ETC applications
|
||||||
|
./install-et-aircraft.sh
|
||||||
|
|||||||
Executable
+7
@@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Author : Gaston Gonzalez
|
||||||
|
# Date : 9 July 2025
|
||||||
|
# Purpose : Test et-aircraft installation
|
||||||
|
|
||||||
|
OUT=$(which et-aircraft && which et-aircraft-app)
|
||||||
|
exit $?
|
||||||
Reference in New Issue
Block a user