mirror of
https://github.com/sdr-enthusiasts/docker-adsb-ultrafeeder.git
synced 2024-11-22 13:50:14 +00:00
cleaned up some transient startup error messages
This commit is contained in:
parent
87ed358608
commit
b14713b1b3
3 changed files with 17 additions and 6 deletions
|
@ -90,6 +90,16 @@ do
|
||||||
# shellcheck disable=SC2048,SC2086
|
# shellcheck disable=SC2048,SC2086
|
||||||
execstring="$(echo ${MLAT_CMD} ${MLAT_PARAM[*]} | xargs)"
|
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:
|
# run this Mlat_client instance in the background:
|
||||||
echo "[$(date)][${APPNAME}] starting: ${MLAT_CMD} ${MLAT_PARAM[*]}"
|
echo "[$(date)][${APPNAME}] starting: ${MLAT_CMD} ${MLAT_PARAM[*]}"
|
||||||
|
|
||||||
|
|
|
@ -99,15 +99,15 @@ fi
|
||||||
# Handle "--net-heartbeat=<rate>"
|
# Handle "--net-heartbeat=<rate>"
|
||||||
MLATHUB_CMD+=("--net-heartbeat=${READSB_NET_HEARTBEAT:-30}")
|
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
|
then
|
||||||
echo "[$(date)][mlathub] Delaying MLAT hub start until container is established..."
|
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
|
do
|
||||||
sleep 2
|
sleep 2
|
||||||
done
|
done
|
||||||
fi
|
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..."
|
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
|
"${MLATHUB_BIN}" "${MLATHUB_CMD[@]}" $MLATHUB_EXTRA_ARGS >/dev/null 2>/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "[$(date +%Y-%m-%d %H:%M:%S)][mlathub] The mlathub instance has exited. Restarting in 10 seconds."
|
||||||
|
sleep 10
|
|
@ -1,8 +1,6 @@
|
||||||
#!/usr/bin/with-contenv bash
|
#!/usr/bin/with-contenv bash
|
||||||
# shellcheck shell=bash disable=SC2016
|
# shellcheck shell=bash disable=SC2016
|
||||||
|
|
||||||
#all-in-one
|
|
||||||
|
|
||||||
mkdir -p /run/readsb
|
mkdir -p /run/readsb
|
||||||
|
|
||||||
# Build the readsb command line based on options
|
# 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
|
"${READSB_BIN}" "${READSB_CMD[@]}" $READSB_EXTRA_ARGS >/dev/null 2>/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "[$(date +%Y-%m-%d %H:%M:%S)][readsb] The main readsb instance has exited. Restarting in 10 seconds."
|
||||||
|
sleep 10
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue