[hamradio-commits] [dump1090-mutability] 112/172: 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.
Matteo F. Vescovi
mfv at moszumanska.debian.org
Sun Jan 28 13:45:51 UTC 2018
This is an automated email from the git hooks/post-receive script.
mfv pushed a commit to branch master
in repository dump1090-mutability.
commit e3c45c682f34db28adf3e973e4ad2abf8aff210b
Author: Oliver Jowett <oliver at mutability.co.uk>
Date: Sun Jan 24 18:45:35 2016 +0000
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.
---
debian/config-template | 3 ---
debian/dump1090-mutability.config | 21 +++++++++++++--------
debian/dump1090-mutability.init | 3 +--
debian/dump1090-mutability.templates | 24 ++++++++++--------------
4 files changed, 24 insertions(+), 27 deletions(-)
diff --git a/debian/config-template b/debian/config-template
index 2a9d343..3f00c45 100644
--- a/debian/config-template
+++ b/debian/config-template
@@ -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=
diff --git a/debian/dump1090-mutability.config b/debian/dump1090-mutability.config
index 3e70c61..ced85dd 100644
--- a/debian/dump1090-mutability.config
+++ b/debian/dump1090-mutability.config
@@ -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
diff --git a/debian/dump1090-mutability.init b/debian/dump1090-mutability.init
index 39b2415..b75fe19 100644
--- a/debian/dump1090-mutability.init
+++ b/debian/dump1090-mutability.init
@@ -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
diff --git a/debian/dump1090-mutability.templates b/debian/dump1090-mutability.templates
index 0302d70..53d56e3 100644
--- a/debian/dump1090-mutability.templates
+++ b/debian/dump1090-mutability.templates
@@ -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
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/dump1090-mutability.git
More information about the pkg-hamradio-commits
mailing list