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

readsb: avoid restarts which are too fast

start instantly on first start though
This commit is contained in:
Matthias Wirth 2024-08-03 20:19:14 +02:00
parent 46244945ad
commit e0ac71fd9e

View file

@ -364,6 +364,12 @@ if chk_enabled "$PROMETHEUS_ENABLE"; then
READSB_CMD+=("--write-prom=/run/readsb-prometheus.prom") READSB_CMD+=("--write-prom=/run/readsb-prometheus.prom")
fi fi
# wait 15 seconds if this is not the first startup
if [[ $(s6-svdt /run/service/readsb | wc -l) != 0 ]]; then
"${s6wrap[@]}" --args echo "delaying restart by 15 seconds"
sleep 15
fi
# shellcheck disable=SC2086 # shellcheck disable=SC2086
if [[ "${LOGLEVEL,,}" == "verbose" ]]; then if [[ "${LOGLEVEL,,}" == "verbose" ]]; then
exec "${s6wrap[@]}" --args "${READSB_BIN}" "${READSB_CMD[@]}" $READSB_AUTOMATION_ARGS $READSB_EXTRA_ARGS exec "${s6wrap[@]}" --args "${READSB_BIN}" "${READSB_CMD[@]}" $READSB_AUTOMATION_ARGS $READSB_EXTRA_ARGS