mirror of
https://github.com/sdr-enthusiasts/docker-adsb-ultrafeeder.git
synced 2024-12-25 05:42:00 +00:00
update
This commit is contained in:
parent
8e11964c40
commit
8af1ec1e33
1 changed files with 18 additions and 2 deletions
|
@ -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
|
Loading…
Reference in a new issue