From 0d9bc1e0eac4c3d8ce2a41a0961e3244c57a4bb4 Mon Sep 17 00:00:00 2001 From: Michel Pawlak Date: Thu, 30 Jun 2022 17:56:15 +0200 Subject: [PATCH 1/7] add option to accept unknown settings --- entrypoint.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 4de94b8..742dc11 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 From 3ee0ef3d633be1baf4be9032af9ac2599c93c022 Mon Sep 17 00:00:00 2001 From: Michel Pawlak Date: Thu, 30 Jun 2022 18:01:29 +0200 Subject: [PATCH 2/7] fix indentation --- entrypoint.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 742dc11..8ed1b9a 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -70,14 +70,14 @@ else if [[ -z "$config_option" ]]; then 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" + 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 + else >&2 echo "[ERROR]: Unable to find config corresponding to variable \"$var\"" exit 1 fi else - set_config "$config_option" "$value" + set_config "$config_option" "$value" fi done < <( printenv --null | sed -zn 's/^MUMBLE_CONFIG_//p' ) From a13397cebb79df353002a0eda38df042469224c7 Mon Sep 17 00:00:00 2001 From: Michel Pawlak Date: Thu, 30 Jun 2022 21:14:46 +0200 Subject: [PATCH 3/7] document MUMBLE_ACCEPT_UNKNOWN_SETTINGS environment variable --- README.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e2f41f8..a341330 100644 --- a/README.md +++ b/README.md @@ -86,16 +86,21 @@ You can specify these environment variables when starting the container using th $ docker run -e "MUMBLE_CONFIG_SERVER_PASSWORD=123" ``` +Note: In the unlikely case where a `` setting is unknown to the container, startup will fail. The root cause of this error is the fact that +this setting is incorrectly registered in the Murmur server code. You can workaround this error by setting the `MUMBLE_ACCEPT_UNKNOWN_SETTINGS` +environment variable to true and spelling `` exactly as written in [Murmur.ini](https://wiki.mumble.info/wiki/Murmur.ini) documentation. + ### Additional variables 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 above). | +| `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 | ## Building the container From 84d73a7271ceb98067763cc66823cf13c095fe1a Mon Sep 17 00:00:00 2001 From: Michel Pawlak Date: Fri, 1 Jul 2022 10:02:07 +0200 Subject: [PATCH 4/7] Replace Murmur with Mumble Co-authored-by: Robert Adam --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a341330..a7400c3 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,7 @@ $ docker run -e "MUMBLE_CONFIG_SERVER_PASSWORD=123" ``` Note: In the unlikely case where a `` setting is unknown to the container, startup will fail. The root cause of this error is the fact that -this setting is incorrectly registered in the Murmur server code. You can workaround this error by setting the `MUMBLE_ACCEPT_UNKNOWN_SETTINGS` +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 [Murmur.ini](https://wiki.mumble.info/wiki/Murmur.ini) documentation. From 6f40137ca80b21bd9c2f2d9bd83ad4d95cbf6382 Mon Sep 17 00:00:00 2001 From: Michel Pawlak Date: Fri, 1 Jul 2022 10:08:17 +0200 Subject: [PATCH 5/7] Update README.md Co-authored-by: Robert Adam --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a7400c3..5ea352c 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,7 @@ $ docker run -e "MUMBLE_CONFIG_SERVER_PASSWORD=123" Note: In the unlikely case where a `` setting is unknown to the container, startup will fail. 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 [Murmur.ini](https://wiki.mumble.info/wiki/Murmur.ini) documentation. +environment variable to `true` and spelling `` exactly as written in the [Murmur.ini](https://wiki.mumble.info/wiki/Murmur.ini) documentation. ### Additional variables From 305203fe856ece181bbd422e0133d5159da6a9e3 Mon Sep 17 00:00:00 2001 From: Michel Pawlak Date: Fri, 1 Jul 2022 10:10:30 +0200 Subject: [PATCH 6/7] update README.md --- README.md | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5ea352c..85bb1c4 100644 --- a/README.md +++ b/README.md @@ -86,10 +86,6 @@ You can specify these environment variables when starting the container using th $ docker run -e "MUMBLE_CONFIG_SERVER_PASSWORD=123" ``` -Note: In the unlikely case where a `` setting is unknown to the container, startup will fail. 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. - ### Additional variables @@ -103,6 +99,19 @@ The following _additional_ variables can be set for further server configuration | `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 After having cloned this repository, you can just run From a5dec0c874bbd9842ce2b064424b5b09f82b9d71 Mon Sep 17 00:00:00 2001 From: Michel Pawlak Date: Fri, 1 Jul 2022 10:11:48 +0200 Subject: [PATCH 7/7] update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 85bb1c4..26f496f 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,7 @@ The following _additional_ variables can be set for further server configuration | 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 above). | +| `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 |