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

clean up port assignments

This commit is contained in:
kx1t 2024-03-29 15:30:32 -04:00
parent a407113f1c
commit dcfdb7ff3e
2 changed files with 33 additions and 33 deletions

View file

@ -151,7 +151,7 @@ do
if [[ -n "${return_port_arg}" ]] && ! chk_disabled "${return_port_arg}"; then if [[ -n "${return_port_arg}" ]] && ! chk_disabled "${return_port_arg}"; then
MLAT_PARAM+=("--results beast,listen,${return_port_arg}") MLAT_PARAM+=("--results beast,listen,${return_port_arg}")
elif ! chk_disabled "${return_port_arg}"; then elif ! chk_disabled "${return_port_arg}"; then
MLAT_PARAM+=("--results beast,connect,localhost:31004") MLAT_PARAM+=("--results beast,connect,localhost:${MLATHUB_BEAST_IN_PORT:-31004}")
fi fi
# add input-connect to the param array: # add input-connect to the param array:

View file

@ -47,16 +47,41 @@ READSB_CMD+=("--write-json=/run/readsb")
READSB_CMD+=("--write-state=/var/globe_history") READSB_CMD+=("--write-state=/var/globe_history")
READSB_CMD+=("--json-trace-interval=15") READSB_CMD+=("--json-trace-interval=15")
READSB_CMD+=("--json-reliable=1") READSB_CMD+=("--json-reliable=1")
READSB_CMD+=("--net-json-port=30047")
READSB_CMD+=("--net-ri-port=30001") READSB_CMD+=("--net-ri-port=30001")
READSB_CMD+=("--net-ro-port=30002") READSB_CMD+=("--net-ro-port=30002")
READSB_CMD+=("--net-sbs-port=30003") READSB_CMD+=("--net-sbs-port=30003")
READSB_CMD+=("--net-bi-port=30004,30104") READSB_CMD+=("--net-sbs-in-port=32006")
READSB_CMD+=("--net-bo-port=30005")
READSB_CMD+=("--net-beast-reduce-out-port=30006") # Handle a bunch of custom port assignments:
READSB_CMD+=("--net-json-port=30047") #
READSB_CMD+=(--net-api-port=30152) # net-bi-port is 30004,30104,${READSB_NET_BEAST_INPUT_PORT}
READSB_CMD+=(--net-sbs-in-port=32006) if [[ -n "${READSB_NET_BEAST_INPUT_PORT}" ]]; then readarray -d, -t PORTS <<< "${READSB_NET_BEAST_INPUT_PORT}"; else PORTS=(); fi
PORTS+=("30004")
PORTS+=("30104")
IFS=$'\n' ports="$(printf "%s\n" "${PORTS[@]}" |sort -u)"; ports="$(sed -z 's/\n/,/g;s/^,//g;s/,$//g' <<< "$ports")" # de-duplication
READSB_CMD+=("--net-bi-port=$ports")
# net-bo-port is 30005,${READSB_NET_BEAST_OUTPUT_PORT}
if [[ -n "${READSB_NET_BEAST_OUTPUT_PORT}" ]]; then readarray -d, -t PORTS <<< "${READSB_NET_BEAST_OUTPUT_PORT}"; else PORTS=(); fi
PORTS+=("30005")
IFS=$'\n' ports="$(printf "%s\n" "${PORTS[@]}" |sort -u)"; ports="$(sed -z 's/\n/,/g;s/^,//g;s/,$//g' <<< "$ports")" # de-duplication
READSB_CMD+=("--net-bo-port=$ports")
# net-beast-reduce-out-port is 30006,${READSB_NET_BEAST_REDUCE_OUTPUT_PORT}
if [[ -n "${READSB_NET_BEAST_REDUCE_OUTPUT_PORT}" ]]; then readarray -d, -t PORTS <<< "${READSB_NET_BEAST_REDUCE_OUTPUT_PORT}"; else PORTS=(); fi
PORTS+=("30006")
IFS=$'\n' ports="$(printf "%s\n" "${PORTS[@]}" |sort -u)"; ports="$(sed -z 's/\n/,/g;s/^,//g;s/,$//g' <<< "$ports")" # de-duplication
READSB_CMD+=("--net-beast-reduce-out-port=$ports")
# net-bo-port is 30152,${READSB_ENABLE_API:+unix:/run/readsb/api.sock},${READSB_NET_API_PORT}
if [[ -n "${READSB_NET_API_PORT}" ]]; then readarray -d, -t PORTS <<< "${READSB_NET_API_PORT}"; else PORTS=(); fi
PORTS+=("30152")
if chk_enabled "$READSB_ENABLE_API"; then PORTS+=("unix:/run/readsb/api.sock"); fi
IFS=$'\n' ports="$(printf "%s\n" "${PORTS[@]}" |sort -u)"; ports="$(sed -z 's/\n/,/g;s/^,//g;s/,$//g' <<< "$ports")" # de-duplication
READSB_CMD+=("--net-api-port=$ports")
#########################
if chk_enabled "${READSB_ENABLE_HEATMAP:-true}"; then if chk_enabled "${READSB_ENABLE_HEATMAP:-true}"; then
READSB_CMD+=("--heatmap-dir=/var/globe_history") READSB_CMD+=("--heatmap-dir=/var/globe_history")
@ -124,25 +149,10 @@ if [[ -n "$READSB_RANGE_OUTLINE_HOURS" ]]; then
READSB_CMD+=("--range-outline-hours=$READSB_RANGE_OUTLINE_HOURS") READSB_CMD+=("--range-outline-hours=$READSB_RANGE_OUTLINE_HOURS")
fi fi
##### NETWORK OPTIONS #####
#
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=<seconds>" # Handle "--net-beast-reduce-interval=<seconds>"
# Default it to 0.5 second if no value is provided, which is reasonable for feeding aggregators # 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}") READSB_CMD+=("--net-beast-reduce-interval=${READSB_NET_BEAST_REDUCE_INTERVAL:-0.5}")
# Handle "--net-beast-reduce-out-port=<ports>"
if [[ -n "$READSB_NET_BEAST_REDUCE_OUT_PORT" ]]; then
READSB_CMD+=("--net-beast-reduce-out-port=$READSB_NET_BEAST_REDUCE_OUT_PORT")
fi
if chk_enabled "$READSB_NET_SBS_REDUCE"; then if chk_enabled "$READSB_NET_SBS_REDUCE"; then
READSB_CMD+=("--net-sbs-reduce") READSB_CMD+=("--net-sbs-reduce")
fi fi
@ -159,16 +169,6 @@ if [[ -n "$READSB_NET_BEAST_REDUCE_FILTER_ALT" ]]; then
READSB_CMD+=("--net-beast-reduce-filter-alt=$READSB_NET_BEAST_REDUCE_FILTER_ALT") READSB_CMD+=("--net-beast-reduce-filter-alt=$READSB_NET_BEAST_REDUCE_FILTER_ALT")
fi fi
# Handle "--net-bi-port=<ports>"
if [[ -n "$READSB_NET_BEAST_INPUT_PORT" ]]; then
READSB_CMD+=("--net-bi-port=$READSB_NET_BEAST_INPUT_PORT")
fi
# Handle "--net-bo-port=<ports>"
if [[ -n "$READSB_NET_BEAST_OUTPUT_PORT" ]]; then
READSB_CMD+=("--net-bo-port=$READSB_NET_BEAST_OUTPUT_PORT")
fi
# Handle "--net-buffer=<n>" # Handle "--net-buffer=<n>"
if [[ -n "$READSB_NET_BUFFER" ]]; then if [[ -n "$READSB_NET_BUFFER" ]]; then
READSB_CMD+=("--net-buffer=$READSB_NET_BUFFER") READSB_CMD+=("--net-buffer=$READSB_NET_BUFFER")