mirror of
https://github.com/sdr-enthusiasts/docker-adsb-ultrafeeder.git
synced 2024-11-22 13:50:14 +00:00
fix
This commit is contained in:
parent
4a7120f1d5
commit
d21e179837
1 changed files with 5 additions and 2 deletions
|
@ -89,13 +89,13 @@ do
|
||||||
# If the argument starts with "uuid=", then it must be a UUID, etc.
|
# If the argument starts with "uuid=", then it must be a UUID, etc.
|
||||||
# If the argument isn't any of the above, then it's an "extra argument"
|
# If the argument isn't any of the above, then it's an "extra argument"
|
||||||
|
|
||||||
unset uuid_arg lat_arg lon_arg alt_arg input_connect_arg extra_args
|
unset uuid_arg lat_arg lon_arg alt_arg input_connect_arg return_port_arg extra_args
|
||||||
|
|
||||||
for ((i=2; i<${#params[*]}; i++))
|
for ((i=2; i<${#params[*]}; i++))
|
||||||
do
|
do
|
||||||
if [[ -n "${params[i]}" ]] && [[ "${params[i]}" =~ ^[0-9]+$ ]]; then
|
if [[ -n "${params[i]}" ]] && [[ "${params[i]}" =~ ^[0-9]+$ ]]; then
|
||||||
# It's a number so it must be the return port
|
# It's a number so it must be the return port
|
||||||
MLAT_PARAM+=("--results beast,listen,${params[i]}")
|
return_port_arg="${params[i]}"
|
||||||
elif header="${params[i]:0:5}" && [[ "${header,,}" == "uuid=" ]]; then
|
elif header="${params[i]:0:5}" && [[ "${header,,}" == "uuid=" ]]; then
|
||||||
# It's a UUID
|
# It's a UUID
|
||||||
uuid_arg="${params[i]#*=}"
|
uuid_arg="${params[i]#*=}"
|
||||||
|
@ -122,6 +122,9 @@ do
|
||||||
MLAT_PARAM=(--input-type "${MLAT_INPUT_TYPE:-auto}")
|
MLAT_PARAM=(--input-type "${MLAT_INPUT_TYPE:-auto}")
|
||||||
MLAT_PARAM+=(--server "${params[0]}:${params[1]}")
|
MLAT_PARAM+=(--server "${params[0]}:${params[1]}")
|
||||||
|
|
||||||
|
# add return port:
|
||||||
|
[ -n "${return_port_arg}" ] && MLAT_PARAM+=("--results beast,listen,${return_port_arg}") || true
|
||||||
|
|
||||||
# add input-connect to the param array:
|
# add input-connect to the param array:
|
||||||
MLAT_PARAM+=(--input-connect "${input_connect_arg:-localhost:30005}")
|
MLAT_PARAM+=(--input-connect "${input_connect_arg:-localhost:30005}")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue