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

Fix 2 bugs

- mlat-client user argument needs to be quoted to avoid splitting usernames with spaces
- name_arg parameter needs to be unset between iterations of the loop
This commit is contained in:
kx1t 2024-06-17 06:47:36 -04:00 committed by GitHub
parent e3455aae55
commit fc894892bc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -183,7 +183,7 @@ 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 return_port_arg extra_args unset name_arg 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
@ -234,7 +234,7 @@ do
MLAT_PARAM+=(--input-connect "${input_connect_arg:-localhost:30005}") MLAT_PARAM+=(--input-connect "${input_connect_arg:-localhost:30005}")
if [[ -n "${name_arg}" ]] || [[ -n "${MLAT_USER}" ]]; then if [[ -n "${name_arg}" ]] || [[ -n "${MLAT_USER}" ]]; then
MLAT_PARAM+=(--user "${name_arg:-${MLAT_USER}}") MLAT_PARAM+=(--user \""${name_arg:-${MLAT_USER}}"\")
else else
rnd="${RANDOM}" rnd="${RANDOM}"
"${s6wrap[@]}" --args echo "WARNING: MLAT_USER is not set - using random number \"${rnd}\" as MLAT_USER" "${s6wrap[@]}" --args echo "WARNING: MLAT_USER is not set - using random number \"${rnd}\" as MLAT_USER"