From 3047cdc9101c566415f1a83c9c49d9456315a17d Mon Sep 17 00:00:00 2001 From: Matthias Wirth Date: Tue, 20 Feb 2024 15:01:12 +0100 Subject: [PATCH] add READSB_ENABLE_API to readsb startup script / documentation most of this feature is handled in the docker-tar1090 baseimage --- README.md | 1 + rootfs/etc/s6-overlay/scripts/readsb | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/README.md b/README.md index a94ad4b..9aefcc3 100644 --- a/README.md +++ b/README.md @@ -358,6 +358,7 @@ There are many optional parameters relating to the ingestion of data and the gen | Variable | Description | Controls which `readsb` option | Default | | ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------- | ------------- | | `READSB_NET_API_PORT` | | `--net-api-port=` | `30152` | +| `READSB_ENABLE_API` | Adds nginx proxies api at /re-api. Use with extraargs --write-json-globe-index --tar1090-use-api to get fast map with many planes | various | disabled | | `READSB_NET_BEAST_REDUCE_INTERVAL` | BeastReduce position update interval, longer means less data (valid range: `0.000` - `14.999`) | `--net-beast-reduce-interval=` | `1.0` | | `READSB_NET_BEAST_REDUCE_FILTER_DIST` | Restrict beast-reduce output to aircraft in a radius of X nmi | `--net-beast-reduce-filter-dist=` | Unset | | `READSB_NET_BEAST_REDUCE_FILTER_ALT` | Restrict beast-reduce output to aircraft below X ft | `--net-beast-reduce-filter-alt=` | Unset | diff --git a/rootfs/etc/s6-overlay/scripts/readsb b/rootfs/etc/s6-overlay/scripts/readsb index 98202bc..d8e31b9 100755 --- a/rootfs/etc/s6-overlay/scripts/readsb +++ b/rootfs/etc/s6-overlay/scripts/readsb @@ -130,6 +130,10 @@ fi READSB_CMD+=("--net-api-port=${READSB_NET_API_PORT:-30152}") +if chk_enabled "${READSB_ENABLE_API}"; then + READSB_CMD+=("--net-api-port=unix:/run/readsb/api.sock") +fi + # Handle "--net-beast-reduce-interval=" # Default it to 0.5 second if no value is provided, which is reasonable for feeding aggregators READSB_CMD+=("--net-beast-reduce-interval=${READSB_NET_BEAST_REDUCE_INTERVAL:-0.5}")