From 7748ff4de1cebc864b779f7b64361f3b7bd61bef Mon Sep 17 00:00:00 2001 From: Matthias Wirth Date: Tue, 9 Apr 2024 23:53:12 +0200 Subject: [PATCH 1/2] adsbx-stats: use exec --- rootfs/etc/s6-overlay/scripts/adsbx-stats | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rootfs/etc/s6-overlay/scripts/adsbx-stats b/rootfs/etc/s6-overlay/scripts/adsbx-stats index accd6b0..ac71ea4 100755 --- a/rootfs/etc/s6-overlay/scripts/adsbx-stats +++ b/rootfs/etc/s6-overlay/scripts/adsbx-stats @@ -24,13 +24,13 @@ s6wrap=(s6wrap --quiet --timestamps --prepend="$(basename "$0")" --args) # Check if ADSBExchange is configured if ! grep -i adsbexchange.com <<< "$ULTRAFEEDER_CONFIG" >/dev/null 2>&1; then "${s6wrap[@]}" echo "AdsbExchange not configured - no stats package needed" - sleep infinity & wait $! + exec sleep infinity fi # Check if ADSBExchange stats are disabled if chk_disabled "$ADSBX_STATS" ; then "${s6wrap[@]}" echo "AdsbExchange stats disabled" - sleep infinity & wait $! + exec sleep infinity fi # prep work: @@ -43,7 +43,7 @@ fi if [[ ! -f /usr/local/bin/json-status ]]; then if ! curl -sSL -o /usr/local/bin/json-status https://raw.githubusercontent.com/sdr-enthusiasts/docker-adsb-ultrafeeder/main/downloads/adsbexchange-json-status; then "${s6wrap[@]}" echo "ERROR: AdsbExchange configured, but cannot download stats package! AdsbExchange will be fed but stats will not be available" - sleep infinity & wait $! + exec sleep infinity fi chmod 755 /usr/local/bin/json-status fi @@ -89,4 +89,4 @@ fi } & "${s6wrap[@]}" echo "invoking: /usr/local/bin/json-status" -"${s6wrap[@]}" /usr/local/bin/json-status +exec "${s6wrap[@]}" /usr/local/bin/json-status From 761df76b3ac77d0700addf369a55de8870613215 Mon Sep 17 00:00:00 2001 From: Matthias Wirth Date: Sat, 13 Apr 2024 23:52:17 +0200 Subject: [PATCH 2/2] aircraft.csv.gz path changes due to tar1090-update changes --- rootfs/etc/s6-overlay/scripts/readsb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rootfs/etc/s6-overlay/scripts/readsb b/rootfs/etc/s6-overlay/scripts/readsb index d8ee014..ba29c24 100755 --- a/rootfs/etc/s6-overlay/scripts/readsb +++ b/rootfs/etc/s6-overlay/scripts/readsb @@ -254,8 +254,11 @@ if [[ -n "$READSB_NET_VRS_PORT" ]]; then fi # make sure the db file exists, and if it does, use it -if [[ -e $TAR1090_INSTALL_DIR/aircraft.csv.gz ]]; then - if [[ "$TAR1090_ENABLE_AC_DB" == "true" ]]; then +if [[ "$TAR1090_ENABLE_AC_DB" == "true" ]]; then + if [[ -e $TAR1090_UPDATE_DIR/aircraft.csv.gz ]]; then + READSB_CMD+=("--db-file=$TAR1090_UPDATE_DIR/aircraft.csv.gz") + elif [[ -e $TAR1090_INSTALL_DIR/aircraft.csv.gz ]]; then + # fallback to container supplied not updated csv.gz READSB_CMD+=("--db-file=$TAR1090_INSTALL_DIR/aircraft.csv.gz") fi fi