case insensitivity hotfix.

This commit is contained in:
Daan Selen 2025-04-09 16:40:49 +02:00
parent 90b2a3dfec
commit 4cd9196650

View File

@ -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"