From 9e6b98a031a6f1c23c5dd6ab41f3aae130c76a0b Mon Sep 17 00:00:00 2001 From: Daan Selen Date: Tue, 25 Mar 2025 15:16:39 +0100 Subject: [PATCH] Made names consistent --- docker/entrypoint.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 99027d8c..038edfba 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -93,7 +93,7 @@ if [[ "$DYNAMIC_CONFIG" =~ ^(true|yes)$ ]]; then echo "If defaults are going to get applied, refer to: https://raw.githubusercontent.com/Ylianst/MeshCentral/master/meshcentral-config-schema.json" # SESSIONKEY - if [[ $REGENSESSIONKEY =~ ^(true|yes)$ ]]; then + if [[ $REGEN_SESSIONKEY =~ ^(true|yes)$ ]]; then echo "Regenerating Session-Key because REGENSESSIONKEY is 'true' or 'yes'" SESSION_KEY=$(tr -dc 'A-Z0-9' < /dev/urandom | fold -w 96 | head -n 1) @@ -120,15 +120,15 @@ if [[ "$DYNAMIC_CONFIG" =~ ^(true|yes)$ ]]; then fi # ALLOWPLUGINS - if [[ -n $ALLOWPLUGINS ]] && [[ $ALLOWPLUGINS =~ ^(true|false)$ ]]; then - echo "Setting plugins... $ALLOWPLUGINS" + if [[ -n $ALLOW_PLUGINS ]] && [[ $ALLOW_PLUGINS =~ ^(true|false)$ ]]; then + echo "Setting plugins... $ALLOW_PLUGINS" sed -i 's/"_plugins"/"plugins"/' "$CONFIG_FILE" - jq --argjson allow_plugins "$ALLOWPLUGINS" \ + jq --argjson allow_plugins "$ALLOW_PLUGINS" \ '.settings.plugins.enabled = $allow_plugins' \ "$CONFIG_FILE" > temp_config.json && mv temp_config.json "$CONFIG_FILE" else - echo "Invalid or no ALLOWPLUGINS value given, commenting out so default applies... Value given: $ALLOWPLUGINS" + echo "Invalid or no ALLOWPLUGINS value given, commenting out so default applies... Value given: $ALLOW_PLUGINS" sed -i 's/"plugins":/"_plugins":/g' "$CONFIG_FILE" fi @@ -193,15 +193,15 @@ if [[ "$DYNAMIC_CONFIG" =~ ^(true|yes)$ ]]; then fi # LOCALSESSIONRECORDING - if [[ -n $LOCALSESSIONRECORDING ]] && [[ $LOCALSESSIONRECORDING =~ ^(true|false)$ ]]; then - echo "Setting localSessionRecording... $LOCALSESSIONRECORDING" + if [[ -n $LOCAL_SESSION_RECORDING ]] && [[ $LOCAL_SESSION_RECORDING =~ ^(true|false)$ ]]; then + echo "Setting localSessionRecording... $LOCAL_SESSION_RECORDING" sed -i 's/"_localSessionRecording"/"localSessionRecording"/' "$CONFIG_FILE" - jq --argjson session_recording "$LOCALSESSIONRECORDING" \ + jq --argjson session_recording "$LOCAL_SESSION_RECORDING" \ '.domains[""].localSessionRecording = $session_recording' \ "$CONFIG_FILE" > temp_config.json && mv temp_config.json "$CONFIG_FILE" else - echo "Invalid or no LOCALSESSIONRECORDING value given, commenting out so default applies... Value given: $LOCALSESSIONRECORDING" + echo "Invalid or no LOCALSESSIONRECORDING value given, commenting out so default applies... Value given: $LOCAL_SESSION_RECORDING" sed -i 's/"localSessionRecording":/"_localSessionRecording":/g' "$CONFIG_FILE" fi