Support multiple listening ports per listener type.
Beast input defaults to listening on both 30004 and 30104. Drop the FATSV listener entirely (use faup1090 for that) Ignore --net-beast.
This commit is contained in:
parent
1a2926b311
commit
2b466535de
11 changed files with 124 additions and 120 deletions
3
debian/config-template
vendored
3
debian/config-template
vendored
|
|
@ -84,9 +84,6 @@ BEAST_INPUT_PORT=
|
|||
# Port to listen on for Beast-format output connections. 0 disables.
|
||||
BEAST_OUTPUT_PORT=
|
||||
|
||||
# Port to listen on for FATSV-format output connections. 0 disables.
|
||||
FATSV_OUTPUT_PORT=
|
||||
|
||||
# TCP heartbeat interval in seconds. 0 disables.
|
||||
NET_HEARTBEAT=
|
||||
|
||||
|
|
|
|||
21
debian/dump1090-mutability.config
vendored
21
debian/dump1090-mutability.config
vendored
|
|
@ -38,7 +38,6 @@ if [ -e $CONFIGFILE ]; then
|
|||
db_set $NAME/net-bi-port "$BEAST_INPUT_PORT"
|
||||
db_set $NAME/net-bo-port "$BEAST_OUTPUT_PORT"
|
||||
db_set $NAME/net-sbs-port "$SBS_OUTPUT_PORT"
|
||||
db_set $NAME/net-fatsv-port "$FATSV_OUTPUT_PORT"
|
||||
db_set $NAME/net-heartbeat "$NET_HEARTBEAT"
|
||||
db_set $NAME/net-out-size "$NET_OUTPUT_SIZE"
|
||||
db_set $NAME/net-out-interval "$NET_OUTPUT_INTERVAL"
|
||||
|
|
@ -183,6 +182,13 @@ is_port_number() {
|
|||
fi
|
||||
}
|
||||
|
||||
is_port_list() {
|
||||
for port in $(echo $1 | sed 's@,@ @g'); do
|
||||
if ! is_port_number "$port"; then return 0; fi
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
db_input high $NAME/auto-start || true
|
||||
db_input_verify low $NAME/run-as-user is_non_root_user || true
|
||||
db_input_verify low $NAME/log-file is_not_empty || true
|
||||
|
|
@ -208,13 +214,12 @@ db_go || true; db_get $NAME/auto-start; if [ "$RET" = "true" ]; then
|
|||
db_input_verify medium $NAME/decode-lon is_number_or_empty || true
|
||||
fi
|
||||
|
||||
db_input_verify medium $NAME/net-http-port is_port_number || true
|
||||
db_input_verify low $NAME/net-ri-port is_port_number || true
|
||||
db_input_verify low $NAME/net-ro-port is_port_number || true
|
||||
db_input_verify low $NAME/net-bi-port is_port_number || true
|
||||
db_input_verify low $NAME/net-bo-port is_port_number || true
|
||||
db_input_verify low $NAME/net-sbs-port is_port_number || true
|
||||
db_input_verify low $NAME/net-fatsv-port is_port_number || true
|
||||
db_input_verify medium $NAME/net-http-port is_port_list || true
|
||||
db_input_verify low $NAME/net-ri-port is_port_list || true
|
||||
db_input_verify low $NAME/net-ro-port is_port_list || true
|
||||
db_input_verify low $NAME/net-bi-port is_port_list || true
|
||||
db_input_verify low $NAME/net-bo-port is_port_list || true
|
||||
db_input_verify low $NAME/net-sbs-port is_port_list || true
|
||||
db_input_verify low $NAME/net-heartbeat is_unsigned_number || true
|
||||
db_input_verify low $NAME/net-out-size is_unsigned_int || true
|
||||
db_input_verify low $NAME/net-out-interval is_unsigned_number || true
|
||||
|
|
|
|||
3
debian/dump1090-mutability.init
vendored
3
debian/dump1090-mutability.init
vendored
|
|
@ -39,7 +39,6 @@ SCRIPTNAME=/etc/init.d/$NAME
|
|||
[ -z "$SBS_OUTPUT_PORT" ] && SBS_OUTPUT_PORT=0
|
||||
[ -z "$BEAST_INPUT_PORT" ] && BEAST_INPUT_PORT=0
|
||||
[ -z "$BEAST_OUTPUT_PORT" ] && BEAST_OUTPUT_PORT=0
|
||||
[ -z "$FATSV_OUTPUT_PORT" ] && FATSV_OUTPUT_PORT=0
|
||||
[ -z "$NET_BUFFER" ] && NET_BUFFER=0
|
||||
[ -z "$JSON_INTERVAL" ] && JSON_INTERVAL=0
|
||||
[ -z "$MAX_RANGE" ] && MAX_RANGE=300
|
||||
|
|
@ -72,7 +71,7 @@ ARGS="$ARGS --max-range $MAX_RANGE"; fi
|
|||
ARGS="$ARGS --net-http-port $HTTP_PORT \
|
||||
--net-ri-port $RAW_INPUT_PORT --net-ro-port $RAW_OUTPUT_PORT \
|
||||
--net-bi-port $BEAST_INPUT_PORT --net-bo-port $BEAST_OUTPUT_PORT \
|
||||
--net-sbs-port $SBS_OUTPUT_PORT --net-fatsv-port $FATSV_OUTPUT_PORT"
|
||||
--net-sbs-port $SBS_OUTPUT_PORT"
|
||||
if [ -n "$NET_HEARTBEAT" ]; then ARGS="$ARGS --net-heartbeat $NET_HEARTBEAT"; fi
|
||||
if [ -n "$NET_OUTPUT_SIZE" ]; then ARGS="$ARGS --net-ro-size $NET_OUTPUT_SIZE"; fi
|
||||
if [ -n "$NET_OUTPUT_INTERVAL" ]; then ARGS="$ARGS --net-ro-interval $NET_OUTPUT_INTERVAL"; fi
|
||||
|
|
|
|||
24
debian/dump1090-mutability.templates
vendored
24
debian/dump1090-mutability.templates
vendored
|
|
@ -131,7 +131,7 @@ Type: string
|
|||
Default: 0
|
||||
|
||||
Template: dump1090-mutability/net-ri-port
|
||||
Description: Port for AVR-format input connections (0 disables):
|
||||
Description: Portsfor AVR-format input connections (0 disables):
|
||||
dump1090 can accept connections to receive data from other sources in
|
||||
several formats. This setting controls the port dump1090 will listen
|
||||
on for AVR ("raw") format input connections.
|
||||
|
|
@ -139,7 +139,7 @@ Type: string
|
|||
Default: 30001
|
||||
|
||||
Template: dump1090-mutability/net-ro-port
|
||||
Description: Port for AVR-format output connections (0 disables):
|
||||
Description: Ports for AVR-format output connections (0 disables):
|
||||
dump1090 can forward ADS-B messages to other software in several formats.
|
||||
This setting controls the port dump1090 will listen on for AVR ("raw")
|
||||
format output connections.
|
||||
|
|
@ -147,15 +147,15 @@ Type: string
|
|||
Default: 30002
|
||||
|
||||
Template: dump1090-mutability/net-bi-port
|
||||
Description: Port for Beast-format input connections (0 disables):
|
||||
Description: Ports for Beast-format input connections (0 disables):
|
||||
dump1090 can accept connections to receive data from other sources in
|
||||
several formats. This setting controls the port dump1090 will listen
|
||||
on for Beast ("binary") format input connections.
|
||||
Type: string
|
||||
Default: 30004
|
||||
Default: 30004,30104
|
||||
|
||||
Template: dump1090-mutability/net-bo-port
|
||||
Description: Port for Beast-format output connections (0 disables):
|
||||
Description: Ports for Beast-format output connections (0 disables):
|
||||
dump1090 can forward ADS-B messages to other software in several formats.
|
||||
This setting controls the port dump1090 will listen on for Beast ("binary")
|
||||
format output connections.
|
||||
|
|
@ -163,21 +163,13 @@ Type: string
|
|||
Default: 30005
|
||||
|
||||
Template: dump1090-mutability/net-sbs-port
|
||||
Description: Port for SBS-format output connections (0 disables):
|
||||
Description: Ports for SBS-format output connections (0 disables):
|
||||
dump1090 can forward ADS-B messages to other software in several formats.
|
||||
This setting controls the port dump1090 will listen on for SBS BaseStation
|
||||
format output connections.
|
||||
Type: string
|
||||
Default: 30003
|
||||
|
||||
Template: dump1090-mutability/net-fatsv-port
|
||||
Description: Port for FATSV-format output connections (0 disables):
|
||||
dump1090 can forward ADS-B messages to other software in several formats.
|
||||
This setting controls the port dump1090 will listen on for FlightAware TSV
|
||||
format output connections.
|
||||
Type: string
|
||||
Default: 10001
|
||||
|
||||
Template: dump1090-mutability/net-heartbeat
|
||||
Description: Seconds between heartbeat messages (0 disables):
|
||||
If there is no other data sent on a network connection, dump1090 can
|
||||
|
|
@ -313,6 +305,10 @@ Template: dump1090-mutability/invalid-is_port_number
|
|||
Description: Value must be a valid port number (1024-65535), or zero to disable.
|
||||
Type: error
|
||||
|
||||
Template: dump1090-mutability/invalid-is_port_list
|
||||
Description: Value must be a comma-separated list of valid port numbers (1024-65535), or zero to disable.
|
||||
Type: error
|
||||
|
||||
Template: dump1090-mutability/invalid-is_ipaddrish_or_empty
|
||||
Description: Value must be an IP address or empty.
|
||||
Type: error
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue