mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-07-20 05:58:50 -04:00
case insensitivity hotfix.
This commit is contained in:
parent
90b2a3dfec
commit
4cd9196650
@ -26,7 +26,8 @@ if [[ ${DYNAMIC_CONFIG,,} =~ ^(true|yes)$ ]]; then
|
|||||||
echo "Using Dynamic Configuration values..."
|
echo "Using Dynamic Configuration values..."
|
||||||
|
|
||||||
# BEGIN DATABASE CONFIGURATION FIELDS
|
# BEGIN DATABASE CONFIGURATION FIELDS
|
||||||
if [[ ${USE_MONGODB,,} =~ ^(true|yes)$ ]]; then
|
USE_MONGODB=${USE_MONGODB,,}
|
||||||
|
if [[ $USE_MONGODB =~ ^(true|yes)$ ]]; then
|
||||||
echo "Enabling MongoDB-connector..."
|
echo "Enabling MongoDB-connector..."
|
||||||
|
|
||||||
if [[ -n "$MONGO_URL" ]]; then
|
if [[ -n "$MONGO_URL" ]]; then
|
||||||
@ -45,7 +46,8 @@ if [[ ${DYNAMIC_CONFIG,,} =~ ^(true|yes)$ ]]; then
|
|||||||
sed -i 's/"mongoDb"/"_mongoDb"/' "$CONFIG_FILE"
|
sed -i 's/"mongoDb"/"_mongoDb"/' "$CONFIG_FILE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ${USE_POSTGRESQL,,} =~ ^(true|yes)$ ]]; then
|
USE_POSTGRESQL=${USE_POSTGRESQL,,}
|
||||||
|
if [[ $USE_POSTGRESQL =~ ^(true|yes)$ ]]; then
|
||||||
echo "Enabling PostgreSQL-connector..."
|
echo "Enabling PostgreSQL-connector..."
|
||||||
|
|
||||||
sed -i 's/"_postgres"/"postgres"/' "$CONFIG_FILE"
|
sed -i 's/"_postgres"/"postgres"/' "$CONFIG_FILE"
|
||||||
@ -65,7 +67,8 @@ if [[ ${DYNAMIC_CONFIG,,} =~ ^(true|yes)$ ]]; then
|
|||||||
sed -i 's/"postgres"/"_postgres"/' "$CONFIG_FILE"
|
sed -i 's/"postgres"/"_postgres"/' "$CONFIG_FILE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ${USE_MARIADB,,} =~ ^(true|yes)$ ]]; then
|
USE_MARIADB=${USE_MARIADB,,}
|
||||||
|
if [[ $USE_MARIADB =~ ^(true|yes)$ ]]; then
|
||||||
echo "Enabling MariaDB-connector..."
|
echo "Enabling MariaDB-connector..."
|
||||||
sed -i 's/"_mariaDB"/"mariaDB"/' "$CONFIG_FILE"
|
sed -i 's/"_mariaDB"/"mariaDB"/' "$CONFIG_FILE"
|
||||||
jq --arg mariadb_host "$MARIADB_HOST" \
|
jq --arg mariadb_host "$MARIADB_HOST" \
|
||||||
@ -120,7 +123,8 @@ if [[ ${DYNAMIC_CONFIG,,} =~ ^(true|yes)$ ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# ALLOWPLUGINS
|
# ALLOWPLUGINS
|
||||||
if [[ ${ALLOW_PLUGINS,,} =~ ^(true|false)$ ]]; then
|
ALLOW_PLUGINS=${ALLOW_PLUGINS,,}
|
||||||
|
if [[ $ALLOW_PLUGINS =~ ^(true|false)$ ]]; then
|
||||||
echo "Setting plugins... $ALLOW_PLUGINS"
|
echo "Setting plugins... $ALLOW_PLUGINS"
|
||||||
|
|
||||||
sed -i 's/"_plugins"/"plugins"/' "$CONFIG_FILE"
|
sed -i 's/"_plugins"/"plugins"/' "$CONFIG_FILE"
|
||||||
@ -133,7 +137,8 @@ if [[ ${DYNAMIC_CONFIG,,} =~ ^(true|yes)$ ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# WEBRTC
|
# WEBRTC
|
||||||
if [[ ${WEBRTC,,} =~ ^(true|false)$ ]]; then
|
WEBRTC=${WEBRTC,,}
|
||||||
|
if [[ $WEBRTC =~ ^(true|false)$ ]]; then
|
||||||
echo "Setting WebRTC... $WEBRTC"
|
echo "Setting WebRTC... $WEBRTC"
|
||||||
|
|
||||||
sed -i 's/"_WebRTC"/"WebRTC"/' "$CONFIG_FILE"
|
sed -i 's/"_WebRTC"/"WebRTC"/' "$CONFIG_FILE"
|
||||||
@ -147,7 +152,8 @@ if [[ ${DYNAMIC_CONFIG,,} =~ ^(true|yes)$ ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# IFRAME
|
# IFRAME
|
||||||
if [[ ${IFRAME,,} =~ ^(true|false)$ ]]; then
|
IFRAME=${IFRAME,,}
|
||||||
|
if [[ $IFRAME =~ ^(true|false)$ ]]; then
|
||||||
echo "Setting AllowFraming... $IFRAME"
|
echo "Setting AllowFraming... $IFRAME"
|
||||||
|
|
||||||
sed -i 's/"_AllowFraming"/"AllowFraming"/' "$CONFIG_FILE"
|
sed -i 's/"_AllowFraming"/"AllowFraming"/' "$CONFIG_FILE"
|
||||||
@ -180,7 +186,8 @@ if [[ ${DYNAMIC_CONFIG,,} =~ ^(true|yes)$ ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# ALLOW_NEW_ACCOUNTS
|
# 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"
|
echo "Setting NewAccounts... $ALLOW_NEW_ACCOUNTS"
|
||||||
|
|
||||||
sed -i 's/"_NewAccounts"/"NewAccounts"/' "$CONFIG_FILE"
|
sed -i 's/"_NewAccounts"/"NewAccounts"/' "$CONFIG_FILE"
|
||||||
@ -193,7 +200,8 @@ if [[ ${DYNAMIC_CONFIG,,} =~ ^(true|yes)$ ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# LOCALSESSIONRECORDING
|
# 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"
|
echo "Setting localSessionRecording... $LOCAL_SESSION_RECORDING"
|
||||||
|
|
||||||
sed -i 's/"_localSessionRecording"/"localSessionRecording"/' "$CONFIG_FILE"
|
sed -i 's/"_localSessionRecording"/"localSessionRecording"/' "$CONFIG_FILE"
|
||||||
@ -206,7 +214,8 @@ if [[ ${DYNAMIC_CONFIG,,} =~ ^(true|yes)$ ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# MINIFY
|
# MINIFY
|
||||||
if [[ ${MINIFY,,} =~ ^(true|false)$ ]]; then
|
MINIFY=${MINIFY,,}
|
||||||
|
if [[ $MINIFY =~ ^(true|false)$ ]]; then
|
||||||
echo "Setting minify... $MINIFY"
|
echo "Setting minify... $MINIFY"
|
||||||
|
|
||||||
sed -i 's/"_minify"/"minify"/' "$CONFIG_FILE"
|
sed -i 's/"_minify"/"minify"/' "$CONFIG_FILE"
|
||||||
@ -220,7 +229,8 @@ if [[ ${DYNAMIC_CONFIG,,} =~ ^(true|yes)$ ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# ALLOWED_ORIGIN
|
# ALLOWED_ORIGIN
|
||||||
if [[ ${ALLOWED_ORIGIN,,} =~ ^(true|false)$ ]]; then
|
ALLOWED_ORIGIN=${ALLOWED_ORIGIN,,}
|
||||||
|
if [[ $ALLOWED_ORIGIN =~ ^(true|false)$ ]]; then
|
||||||
echo "Setting allowedOrigin... $ALLOWED_ORIGIN"
|
echo "Setting allowedOrigin... $ALLOWED_ORIGIN"
|
||||||
|
|
||||||
sed -i 's/"_allowedOrigin"/"allowedOrigin"/' "$CONFIG_FILE"
|
sed -i 's/"_allowedOrigin"/"allowedOrigin"/' "$CONFIG_FILE"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user