mirror of
https://github.com/sdr-enthusiasts/docker-adsb-ultrafeeder.git
synced 2024-11-25 15:20:10 +00:00
more exec / prepare for docker-tar1090 change to update-tar1090 (#78)
This commit is contained in:
commit
5934c695e7
2 changed files with 9 additions and 6 deletions
|
@ -24,13 +24,13 @@ s6wrap=(s6wrap --quiet --timestamps --prepend="$(basename "$0")" --args)
|
||||||
# Check if ADSBExchange is configured
|
# Check if ADSBExchange is configured
|
||||||
if ! grep -i adsbexchange.com <<< "$ULTRAFEEDER_CONFIG" >/dev/null 2>&1; then
|
if ! grep -i adsbexchange.com <<< "$ULTRAFEEDER_CONFIG" >/dev/null 2>&1; then
|
||||||
"${s6wrap[@]}" echo "AdsbExchange not configured - no stats package needed"
|
"${s6wrap[@]}" echo "AdsbExchange not configured - no stats package needed"
|
||||||
sleep infinity & wait $!
|
exec sleep infinity
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if ADSBExchange stats are disabled
|
# Check if ADSBExchange stats are disabled
|
||||||
if chk_disabled "$ADSBX_STATS" ; then
|
if chk_disabled "$ADSBX_STATS" ; then
|
||||||
"${s6wrap[@]}" echo "AdsbExchange stats disabled"
|
"${s6wrap[@]}" echo "AdsbExchange stats disabled"
|
||||||
sleep infinity & wait $!
|
exec sleep infinity
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# prep work:
|
# prep work:
|
||||||
|
@ -43,7 +43,7 @@ fi
|
||||||
if [[ ! -f /usr/local/bin/json-status ]]; then
|
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
|
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"
|
"${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
|
fi
|
||||||
chmod 755 /usr/local/bin/json-status
|
chmod 755 /usr/local/bin/json-status
|
||||||
fi
|
fi
|
||||||
|
@ -89,4 +89,4 @@ fi
|
||||||
} &
|
} &
|
||||||
|
|
||||||
"${s6wrap[@]}" echo "invoking: /usr/local/bin/json-status"
|
"${s6wrap[@]}" echo "invoking: /usr/local/bin/json-status"
|
||||||
"${s6wrap[@]}" /usr/local/bin/json-status
|
exec "${s6wrap[@]}" /usr/local/bin/json-status
|
||||||
|
|
|
@ -254,8 +254,11 @@ if [[ -n "$READSB_NET_VRS_PORT" ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# make sure the db file exists, and if it does, use it
|
# 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")
|
READSB_CMD+=("--db-file=$TAR1090_INSTALL_DIR/aircraft.csv.gz")
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue