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 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