refactor: eliminate shellcheck warnings & errors

Redirect multiple commands to the configuration file instead of making
multiple redirects, potentially limiting the number of times the file
needs to be opened for appending. (SC2129)

Use "${arr[*]}" not to mix array and string. (SC2145)
pull/6/head
d3adb5 2022-05-08 22:38:25 -03:00
rodzic 35cb859dc4
commit 7f3c2c1996
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 36962FB62A3776A5
1 zmienionych plików z 6 dodań i 5 usunięć

Wyświetl plik

@ -85,10 +85,11 @@ else
set_config "port" 64738 true set_config "port" 64738 true
set_config "users" 100 true set_config "users" 100 true
# Add ICE section { # Add ICE section
echo -e "\n[Ice]" >> "$CONFIG_FILE" echo -e "\n[Ice]"
echo "Ice.Warn.UnknownProperties=1" >> "$CONFIG_FILE" echo "Ice.Warn.UnknownProperties=1"
echo "Ice.MessageSizeMax=65536" >> "$CONFIG_FILE" echo "Ice.MessageSizeMax=65536"
} >> "$CONFIG_FILE"
fi fi
# Additional environment variables # Additional environment variables
@ -107,7 +108,7 @@ echo "Running Mumble server as uid=$(id -u) gid=$(id -g)"
echo "\"${DATA_DIR}\" has the following permissions set:" echo "\"${DATA_DIR}\" has the following permissions set:"
echo " $( stat ${DATA_DIR} --printf='%A, owner: \"%U\" (UID: %u), group: \"%G\" (GID: %g)' )" echo " $( stat ${DATA_DIR} --printf='%A, owner: \"%U\" (UID: %u), group: \"%G\" (GID: %g)' )"
echo "Command run to start the service : ${server_invocation[@]}" echo "Command run to start the service : ${server_invocation[*]}"
echo "Starting..." echo "Starting..."
exec "${server_invocation[@]}" exec "${server_invocation[@]}"