From df4c098ab7de8fec1c3ff5462fc1acf7f195376b Mon Sep 17 00:00:00 2001 From: kx1t Date: Sun, 5 Feb 2023 11:19:54 -0500 Subject: [PATCH] Add UUID support for `beast_reduce_plus_out` option --- rootfs/etc/cont-init.d/50-store-uuid | 21 +++++++++++++++++++++ rootfs/etc/services.d/readsb/run | 4 ++++ 2 files changed, 25 insertions(+) create mode 100644 rootfs/etc/cont-init.d/50-store-uuid diff --git a/rootfs/etc/cont-init.d/50-store-uuid b/rootfs/etc/cont-init.d/50-store-uuid new file mode 100644 index 0000000..e9a5145 --- /dev/null +++ b/rootfs/etc/cont-init.d/50-store-uuid @@ -0,0 +1,21 @@ +#!/usr/bin/with-contenv bash +#shellcheck shell=bash disable=SC2015 + +# Write UUID to file +#--------------------------------------------------------------------------------------------- +# Copyright (C) 2023, Ramon F. Kolb (kx1t) +# +# This program is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along with this program. +# If not, see . +#--------------------------------------------------------------------------------------------- + +[[ -n "${UUID}" ]] && echo "$UUID" > /run/uuid diff --git a/rootfs/etc/services.d/readsb/run b/rootfs/etc/services.d/readsb/run index 00ce3e9..164548b 100644 --- a/rootfs/etc/services.d/readsb/run +++ b/rootfs/etc/services.d/readsb/run @@ -29,6 +29,10 @@ if [ -n "${BEASTHOST}" ]; then READSB_CMD+=("--net-connector=${BEASTHOST},${BEASTPORT},beast_in") fi +if [ -n "${UUID}" ]; then + READSB_CMD+=("--uuid-file=/run/uuid") +fi + READSB_CMD+=(--write-json=/run/readsb) READSB_CMD+=(--heatmap-dir /var/globe_history) READSB_CMD+=(--heatmap 15)