case insensitivity hotfix.

Daan Selen committed Apr 9, 2025 at 16:40 UTC 4cd91966504b368ccdf1ab7dc732ed338ff66d57
1 file changed +20 -10
docker/entrypoint.sh
+20 -10
@@ -26,7 +26,8 @@ if [[ ${DYNAMIC_CONFIG,,} =~ ^(true|yes)$ ]]; then
26 echo "Using Dynamic Configuration values..."
27
28 # BEGIN DATABASE CONFIGURATION FIELDS
29 - if [[ ${USE_MONGODB,,} =~ ^(true|yes)$ ]]; then
29 + USE_MONGODB=${USE_MONGODB,,}
30 + if [[ $USE_MONGODB =~ ^(true|yes)$ ]]; then
31 echo "Enabling MongoDB-connector..."
32
33 if [[ -n "$MONGO_URL" ]]; then
@@ -45,7 +46,8 @@ if [[ ${DYNAMIC_CONFIG,,} =~ ^(true|yes)$ ]]; then
46 sed -i 's/"mongoDb"/"_mongoDb"/' "$CONFIG_FILE"
47 fi
48
48 - if [[ ${USE_POSTGRESQL,,} =~ ^(true|yes)$ ]]; then
49 + USE_POSTGRESQL=${USE_POSTGRESQL,,}
50 + if [[ $USE_POSTGRESQL =~ ^(true|yes)$ ]]; then
51 echo "Enabling PostgreSQL-connector..."
52
53 sed -i 's/"_postgres"/"postgres"/' "$CONFIG_FILE"
@@ -65,7 +67,8 @@ if [[ ${DYNAMIC_CONFIG,,} =~ ^(true|yes)$ ]]; then
67 sed -i 's/"postgres"/"_postgres"/' "$CONFIG_FILE"
68 fi
69
68 - if [[ ${USE_MARIADB,,} =~ ^(true|yes)$ ]]; then
70 + USE_MARIADB=${USE_MARIADB,,}
71 + if [[ $USE_MARIADB =~ ^(true|yes)$ ]]; then
72 echo "Enabling MariaDB-connector..."
73 sed -i 's/"_mariaDB"/"mariaDB"/' "$CONFIG_FILE"
74 jq --arg mariadb_host "$MARIADB_HOST" \
@@ -120,7 +123,8 @@ if [[ ${DYNAMIC_CONFIG,,} =~ ^(true|yes)$ ]]; then
123 fi
124
125 # ALLOWPLUGINS
123 - if [[ ${ALLOW_PLUGINS,,} =~ ^(true|false)$ ]]; then
126 + ALLOW_PLUGINS=${ALLOW_PLUGINS,,}
127 + if [[ $ALLOW_PLUGINS =~ ^(true|false)$ ]]; then
128 echo "Setting plugins... $ALLOW_PLUGINS"
129
130 sed -i 's/"_plugins"/"plugins"/' "$CONFIG_FILE"
@@ -133,7 +137,8 @@ if [[ ${DYNAMIC_CONFIG,,} =~ ^(true|yes)$ ]]; then
137 fi
138
139 # WEBRTC
136 - if [[ ${WEBRTC,,} =~ ^(true|false)$ ]]; then
140 + WEBRTC=${WEBRTC,,}
141 + if [[ $WEBRTC =~ ^(true|false)$ ]]; then
142 echo "Setting WebRTC... $WEBRTC"
143
144 sed -i 's/"_WebRTC"/"WebRTC"/' "$CONFIG_FILE"
@@ -147,7 +152,8 @@ if [[ ${DYNAMIC_CONFIG,,} =~ ^(true|yes)$ ]]; then
152 fi
153
154 # IFRAME
150 - if [[ ${IFRAME,,} =~ ^(true|false)$ ]]; then
155 + IFRAME=${IFRAME,,}
156 + if [[ $IFRAME =~ ^(true|false)$ ]]; then
157 echo "Setting AllowFraming... $IFRAME"
158
159 sed -i 's/"_AllowFraming"/"AllowFraming"/' "$CONFIG_FILE"
@@ -180,7 +186,8 @@ if [[ ${DYNAMIC_CONFIG,,} =~ ^(true|yes)$ ]]; then
186 fi
187
188 # ALLOW_NEW_ACCOUNTS
183 - if [[ ${ALLOW_NEW_ACCOUNTS,,} =~ ^(true|false)$ ]]; then
189 + ALLOW_NEW_ACCOUNTS=${ALLOW_NEW_ACCOUNTS,,}
190 + if [[ $ALLOW_NEW_ACCOUNTS =~ ^(true|false)$ ]]; then
191 echo "Setting NewAccounts... $ALLOW_NEW_ACCOUNTS"
192
193 sed -i 's/"_NewAccounts"/"NewAccounts"/' "$CONFIG_FILE"
@@ -193,7 +200,8 @@ if [[ ${DYNAMIC_CONFIG,,} =~ ^(true|yes)$ ]]; then
200 fi
201
202 # LOCALSESSIONRECORDING
196 - if [[ ${LOCAL_SESSION_RECORDING,,} =~ ^(true|false)$ ]]; then
203 + LOCAL_SESSION_RECORDING=${LOCAL_SESSION_RECORDING,,}
204 + if [[ $LOCAL_SESSION_RECORDING =~ ^(true|false)$ ]]; then
205 echo "Setting localSessionRecording... $LOCAL_SESSION_RECORDING"
206
207 sed -i 's/"_localSessionRecording"/"localSessionRecording"/' "$CONFIG_FILE"
@@ -206,7 +214,8 @@ if [[ ${DYNAMIC_CONFIG,,} =~ ^(true|yes)$ ]]; then
214 fi
215
216 # MINIFY
209 - if [[ ${MINIFY,,} =~ ^(true|false)$ ]]; then
217 + MINIFY=${MINIFY,,}
218 + if [[ $MINIFY =~ ^(true|false)$ ]]; then
219 echo "Setting minify... $MINIFY"
220
221 sed -i 's/"_minify"/"minify"/' "$CONFIG_FILE"
@@ -220,7 +229,8 @@ if [[ ${DYNAMIC_CONFIG,,} =~ ^(true|yes)$ ]]; then
229 fi
230
231 # ALLOWED_ORIGIN
223 - if [[ ${ALLOWED_ORIGIN,,} =~ ^(true|false)$ ]]; then
232 + ALLOWED_ORIGIN=${ALLOWED_ORIGIN,,}
233 + if [[ $ALLOWED_ORIGIN =~ ^(true|false)$ ]]; then
234 echo "Setting allowedOrigin... $ALLOWED_ORIGIN"
235
236 sed -i 's/"_allowedOrigin"/"allowedOrigin"/' "$CONFIG_FILE"