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

Add startup delay to allow mlat_client to start before mlathub

This commit is contained in:
kx1t 2023-03-23 12:13:55 +01:00 committed by GitHub
parent 4288e66ba1
commit c609c909c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -97,6 +97,15 @@ if [[ -n "$READSB_NET_HEARTBEAT" ]]; then
MLATHUB_CMD+=("--net-heartbeat=$READSB_NET_HEARTBEAT") MLATHUB_CMD+=("--net-heartbeat=$READSB_NET_HEARTBEAT")
fi fi
if (( $(ps -o etimes= -p 1) < 30 ))
then
echo "[$(date)][mlathub] Delaying MLAT hub start until container is established..."
while (( $(ps -o etimes= -p 1) < 30 ))
do
sleep 5
done
fi
echo "[$(date)][mlathub] Starting MLATHUB with this command line: ${MLATHUB_BIN} ${MLATHUB_CMD[*]} $MLATHUB_EXTRA_ARGS" echo "[$(date)][mlathub] Starting MLATHUB with this command line: ${MLATHUB_BIN} ${MLATHUB_CMD[*]} $MLATHUB_EXTRA_ARGS"
# shellcheck disable=SC2086 # shellcheck disable=SC2086