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

remove spaces from MLAT_USER (#150)

the readme already says not to put spaces but like this mlat will work
even with spaces instead of producing errors
This commit is contained in:
wiedehopf 2024-10-09 12:50:22 +02:00 committed by GitHub
parent 1c47b76be2
commit 494d963619
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -239,7 +239,10 @@ 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}}"\") # remove spaces from mlat name to avoid startup errors
# the readme already says not to put spaces but like this mlat will work even with space
name=$( sed -e 's/ /_/g' <<< "${name_arg:-${MLAT_USER}}")
MLAT_PARAM+=(--user "${name}")
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"