Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

readsb: avoid fast restarts on SDR failure / stop service instead of sleep #123

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
readsb: avoid restarts which are too fast
start instantly on first start though
  • Loading branch information
wiedehopf committed Aug 5, 2024
commit e0ac71fd9e45a25180ac4a6efaa926559867b3db
6 changes: 6 additions & 0 deletions rootfs/etc/s6-overlay/scripts/readsb
Original file line number Diff line number Diff line change
@@ -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