1
0
Fork 0
mirror of https://github.com/sdr-enthusiasts/docker-adsb-ultrafeeder.git synced 2024-11-22 05:40:10 +00:00

more exec / prepare for docker-tar1090 change to update-tar1090 (#78)

This commit is contained in:
Fred Clausen 2024-04-13 17:37:56 -06:00 committed by GitHub
commit 5934c695e7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 6 deletions

View file

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

View file

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