1
0
Fork 0
mirror of https://github.com/sdr-enthusiasts/docker-adsb-ultrafeeder.git synced 2024-12-25 22:02:00 +00:00

readsb: avoid restarts which are too fast (#124)

start instantly on first start though
This commit is contained in:
Fred Clausen 2024-08-05 08:49:38 -06:00 committed by GitHub
commit 95761dcce8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -364,6 +364,12 @@ if chk_enabled "$PROMETHEUS_ENABLE"; then
READSB_CMD+=("--write-prom=/run/readsb-prometheus.prom")
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
if [[ "${LOGLEVEL,,}" == "verbose" ]]; then
exec "${s6wrap[@]}" --args "${READSB_BIN}" "${READSB_CMD[@]}" $READSB_AUTOMATION_ARGS $READSB_EXTRA_ARGS