From 4cd91966504b368ccdf1ab7dc732ed338ff66d57 Mon Sep 17 00:00:00 2001 From: Daan Selen Date: Wed, 9 Apr 2025 16:40:49 +0200 Subject: [PATCH] case insensitivity hotfix. --- docker/entrypoint.sh | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index c36f5792..a9c4b4f2 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -26,7 +26,8 @@ if [[ ${DYNAMIC_CONFIG,,} =~ ^(true|yes)$ ]]; then echo "Using Dynamic Configuration values..." # BEGIN DATABASE CONFIGURATION FIELDS - if [[ ${USE_MONGODB,,} =~ ^(true|yes)$ ]]; then + USE_MONGODB=${USE_MONGODB,,} + if [[ $USE_MONGODB =~ ^(true|yes)$ ]]; then echo "Enabling MongoDB-connector..." if [[ -n "$MONGO_URL" ]]; then @@ -45,7 +46,8 @@ if [[ ${DYNAMIC_CONFIG,,} =~ ^(true|yes)$ ]]; then sed -i 's/"mongoDb"/"_mongoDb"/' "$CONFIG_FILE" fi - if [[ ${USE_POSTGRESQL,,} =~ ^(true|yes)$ ]]; then + USE_POSTGRESQL=${USE_POSTGRESQL,,} + if [[ $USE_POSTGRESQL =~ ^(true|yes)$ ]]; then echo "Enabling PostgreSQL-connector..." sed -i 's/"_postgres"/"postgres"/' "$CONFIG_FILE" @@ -65,7 +67,8 @@ if [[ ${DYNAMIC_CONFIG,,} =~ ^(true|yes)$ ]]; then sed -i 's/"postgres"/"_postgres"/' "$CONFIG_FILE" fi - if [[ ${USE_MARIADB,,} =~ ^(true|yes)$ ]]; then + USE_MARIADB=${USE_MARIADB,,} + if [[ $USE_MARIADB =~ ^(true|yes)$ ]]; then echo "Enabling MariaDB-connector..." sed -i 's/"_mariaDB"/"mariaDB"/' "$CONFIG_FILE" jq --arg mariadb_host "$MARIADB_HOST" \ @@ -120,7 +123,8 @@ if [[ ${DYNAMIC_CONFIG,,} =~ ^(true|yes)$ ]]; then fi # ALLOWPLUGINS - if [[ ${ALLOW_PLUGINS,,} =~ ^(true|false)$ ]]; then + ALLOW_PLUGINS=${ALLOW_PLUGINS,,} + if [[ $ALLOW_PLUGINS =~ ^(true|false)$ ]]; then echo "Setting plugins... $ALLOW_PLUGINS" sed -i 's/"_plugins"/"plugins"/' "$CONFIG_FILE" @@ -133,7 +137,8 @@ if [[ ${DYNAMIC_CONFIG,,} =~ ^(true|yes)$ ]]; then fi # WEBRTC - if [[ ${WEBRTC,,} =~ ^(true|false)$ ]]; then + WEBRTC=${WEBRTC,,} + if [[ $WEBRTC =~ ^(true|false)$ ]]; then echo "Setting WebRTC... $WEBRTC" sed -i 's/"_WebRTC"/"WebRTC"/' "$CONFIG_FILE" @@ -147,7 +152,8 @@ if [[ ${DYNAMIC_CONFIG,,} =~ ^(true|yes)$ ]]; then fi # IFRAME - if [[ ${IFRAME,,} =~ ^(true|false)$ ]]; then + IFRAME=${IFRAME,,} + if [[ $IFRAME =~ ^(true|false)$ ]]; then echo "Setting AllowFraming... $IFRAME" sed -i 's/"_AllowFraming"/"AllowFraming"/' "$CONFIG_FILE" @@ -180,7 +186,8 @@ if [[ ${DYNAMIC_CONFIG,,} =~ ^(true|yes)$ ]]; then fi # ALLOW_NEW_ACCOUNTS - if [[ ${ALLOW_NEW_ACCOUNTS,,} =~ ^(true|false)$ ]]; then + ALLOW_NEW_ACCOUNTS=${ALLOW_NEW_ACCOUNTS,,} + if [[ $ALLOW_NEW_ACCOUNTS =~ ^(true|false)$ ]]; then echo "Setting NewAccounts... $ALLOW_NEW_ACCOUNTS" sed -i 's/"_NewAccounts"/"NewAccounts"/' "$CONFIG_FILE" @@ -193,7 +200,8 @@ if [[ ${DYNAMIC_CONFIG,,} =~ ^(true|yes)$ ]]; then fi # LOCALSESSIONRECORDING - if [[ ${LOCAL_SESSION_RECORDING,,} =~ ^(true|false)$ ]]; then + LOCAL_SESSION_RECORDING=${LOCAL_SESSION_RECORDING,,} + if [[ $LOCAL_SESSION_RECORDING =~ ^(true|false)$ ]]; then echo "Setting localSessionRecording... $LOCAL_SESSION_RECORDING" sed -i 's/"_localSessionRecording"/"localSessionRecording"/' "$CONFIG_FILE" @@ -206,7 +214,8 @@ if [[ ${DYNAMIC_CONFIG,,} =~ ^(true|yes)$ ]]; then fi # MINIFY - if [[ ${MINIFY,,} =~ ^(true|false)$ ]]; then + MINIFY=${MINIFY,,} + if [[ $MINIFY =~ ^(true|false)$ ]]; then echo "Setting minify... $MINIFY" sed -i 's/"_minify"/"minify"/' "$CONFIG_FILE" @@ -220,7 +229,8 @@ if [[ ${DYNAMIC_CONFIG,,} =~ ^(true|yes)$ ]]; then fi # ALLOWED_ORIGIN - if [[ ${ALLOWED_ORIGIN,,} =~ ^(true|false)$ ]]; then + ALLOWED_ORIGIN=${ALLOWED_ORIGIN,,} + if [[ $ALLOWED_ORIGIN =~ ^(true|false)$ ]]; then echo "Setting allowedOrigin... $ALLOWED_ORIGIN" sed -i 's/"_allowedOrigin"/"allowedOrigin"/' "$CONFIG_FILE"