diff --git a/README.md b/README.md index e2f41f8..26f496f 100644 --- a/README.md +++ b/README.md @@ -91,11 +91,25 @@ $ docker run -e "MUMBLE_CONFIG_SERVER_PASSWORD=123" The following _additional_ variables can be set for further server configuration: -| Environment Variable | Description | -|-----------------------------|--------------------------------------------------------------------------------------------------------------------------------------------- | -| `MUMBLE_CUSTOM_CONFIG_FILE` | Specify a custom config file path - **all `MUMBLE_CONFIG_` variables are IGNORED**
(it's best to use a path inside the volume `/data/`) | -| `MUMBLE_SUPERUSER_PASSWORD` | Specifies the SuperUser (Admin) password for this server. If this is not given, a random password will be generated upon first startup. | -| `MUMBLE_VERBOSE` | Set to `true` to enable verbose logging in the server | +| Environment Variable | Description | +|----------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------- | +| `MUMBLE_ACCEPT_UNKNOWN_SETTINGS` | Set to `true` to force the container to accept unknown settings passed as a `MUMBLE_CONFIG_` variable (see note below). | +| `MUMBLE_CUSTOM_CONFIG_FILE` | Specify a custom config file path - **all `MUMBLE_CONFIG_` variables are IGNORED**
(it's best to use a path inside the volume `/data/`) | +| `MUMBLE_SUPERUSER_PASSWORD` | Specifies the SuperUser (Admin) password for this server. If this is not given, a random password will be generated upon first startup. | +| `MUMBLE_VERBOSE` | Set to `true` to enable verbose logging in the server | + + +Note: In the unlikely case where a `` setting is unknown to the container, startup will fail with the following error. + + +``` +mumble-server | [ERROR]: Unable to find config corresponding to variable "" +mumble-server exited with code 1 +``` + +The root cause of this error is the fact that this setting is incorrectly registered in the Mumble server code. You can workaround this error by +setting the `MUMBLE_ACCEPT_UNKNOWN_SETTINGS` environment variable to `true` and spelling `` exactly as written in the +[Murmur.ini](https://wiki.mumble.info/wiki/Murmur.ini) documentation. ## Building the container diff --git a/entrypoint.sh b/entrypoint.sh index 4de94b8..8ed1b9a 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -69,11 +69,17 @@ else config_option="${option_for[$(normalize_name "$var")]}" if [[ -z "$config_option" ]]; then - >&2 echo "[ERROR]: Unable to find config corresponding to variable \"$var\"" - exit 1 + if [[ "$MUMBLE_ACCEPT_UNKNOWN_SETTINGS" = true ]]; then + echo "[WARNING]: Unable to find config corresponding to variable \"$var\". Make sure that it is correctly spelled, using it as-is" + set_config "$var" "$value" + else + >&2 echo "[ERROR]: Unable to find config corresponding to variable \"$var\"" + exit 1 + fi + else + set_config "$config_option" "$value" fi - set_config "$config_option" "$value" done < <( printenv --null | sed -zn 's/^MUMBLE_CONFIG_//p' ) # ^ Feeding it in like this, prevents the creation of a subshell for the while-loop