1
0
Fork 0
mirror of https://github.com/sdr-enthusiasts/docker-adsb-ultrafeeder.git synced 2024-12-25 05:42:00 +00:00
This commit is contained in:
kx1t 2023-10-13 08:37:54 -04:00
parent 8e11964c40
commit 8af1ec1e33

View file

@ -15,7 +15,7 @@ ULTRAFEEDER_CONFIG="${ULTRAFEEDER_CONFIG#"${ULTRAFEEDER_CONFIG%%[![:space:]]*}"}
ULTRAFEEDER_CONFIG="${ULTRAFEEDER_CONFIG//; /;}"
if ! grep -i adsbexchange.com <<< "$ULTRAFEEDER_CONFIG" >/dev/null 2>&1; then
"${s6wrap[@]}" echo "AdsbExchange not configured - no stats package needed"
exec sleep infinity
sleep infinity & wait $!
fi
# Install the Stats package:
@ -27,10 +27,26 @@ fi
if [[ ! -f /usr/local/bin/json-status ]]; then
if ! curl -sSL -o /usr/local/bin/json-status https://raw.githubusercontent.com/ADSBexchange/adsbexchange-stats/master/json-status; then
"${s6wrap[@]}" echo "ERROR: AdsbExchange configure, but cannot download stats package! AdsbExchange will be fed but stats will not be available"
exec sleep infinity
sleep infinity & wait $!
fi
chmod 755 /usr/local/bin/json-status
fi
mkdir -p /run/adsbexchange-stats
# wait until readsb is established...
if ! pgrep readsb >/dev/null; then
if [[ -z "${LOGLEVEL}" ]] || [[ "${LOGLEVEL,,}" == "verbose" ]]; then
"${s6wrap[@]}" --args echo "Delaying start of the AdsbExchange Stats module until container is established..."
fi
while ! pgrep readsb >/dev/null
do
sleep 2 & wait $!
done
# wait 2 seconds after readsb process exists
sleep 2 & wait $!
fi
"${s6wrap[@]}" --args echo "invoking: /usr/local/bin/json-status"
"${s6wrap[@]}" /usr/local/bin/json-status