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

cleaned up some transient startup error messages

This commit is contained in:
kx1t 2023-04-08 09:21:46 -04:00
parent 87ed358608
commit b14713b1b3
3 changed files with 17 additions and 6 deletions

View file

@ -90,6 +90,16 @@ do
# shellcheck disable=SC2048,SC2086
execstring="$(echo ${MLAT_CMD} ${MLAT_PARAM[*]} | xargs)"
# Wait a bit until readsb is established...
if ! pgrep readsb >/dev/null
then
echo "[$(date)][mlathub] Delaying start of MLAT client(s) until container is established..."
while ! pgrep readsb >/dev/null
sleep 2
done
fi
sleep 10 # sleep a bit so everything is well established - starting readsb may take a bit
# run this Mlat_client instance in the background:
echo "[$(date)][${APPNAME}] starting: ${MLAT_CMD} ${MLAT_PARAM[*]}"

View file

@ -99,15 +99,15 @@ fi
# Handle "--net-heartbeat=<rate>"
MLATHUB_CMD+=("--net-heartbeat=${READSB_NET_HEARTBEAT:-30}")
if ! pgrep readsb >/dev/null 2>&1
if ! pgrep readsb >/dev/null || ! pgrep 'mlat-client' >/dev/null
then
echo "[$(date)][mlathub] Delaying MLAT hub start until container is established..."
while ! pgrep readsb >/dev/null 2>&1
while ! pgrep readsb >/dev/null || ! pgrep 'mlat-client' >/dev/null
do
sleep 2
done
fi
sleep 5 # sleep a bit so readsb is well established
sleep 5 # sleep a bit so everything is well established
echo "[$(date)][mlathub] Starting MLATHUB..."
@ -122,3 +122,5 @@ elif [[ "${LOGLEVEL,,}" == "none" ]]; then
"${MLATHUB_BIN}" "${MLATHUB_CMD[@]}" $MLATHUB_EXTRA_ARGS >/dev/null 2>/dev/null
fi
echo "[$(date +%Y-%m-%d %H:%M:%S)][mlathub] The mlathub instance has exited. Restarting in 10 seconds."
sleep 10

View file

@ -1,8 +1,6 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash disable=SC2016
#all-in-one
mkdir -p /run/readsb
# Build the readsb command line based on options
@ -322,6 +320,7 @@ elif [[ "${LOGLEVEL,,}" == "none" ]]; then
"${READSB_BIN}" "${READSB_CMD[@]}" $READSB_EXTRA_ARGS >/dev/null 2>/dev/null
fi
echo "[$(date +%Y-%m-%d %H:%M:%S)][readsb] The main readsb instance has exited. Restarting in 10 seconds."
sleep 10