@@ -93,7 +93,7 @@ if [[ "$DYNAMIC_CONFIG" =~ ^(true|yes)$ ]]; then
9393 echo " If defaults are going to get applied, refer to: https://raw.githubusercontent.com/Ylianst/MeshCentral/master/meshcentral-config-schema.json"
9494
9595 # SESSIONKEY
96- if [[ $REGENSESSIONKEY =~ ^(true| yes)$ ]]; then
96+ if [[ $REGEN_SESSIONKEY =~ ^(true| yes)$ ]]; then
9797 echo " Regenerating Session-Key because REGENSESSIONKEY is 'true' or 'yes'"
9898 SESSION_KEY=$( tr -dc ' A-Z0-9' < /dev/urandom | fold -w 96 | head -n 1)
9999
@@ -120,15 +120,15 @@ if [[ "$DYNAMIC_CONFIG" =~ ^(true|yes)$ ]]; then
120120 fi
121121
122122 # ALLOWPLUGINS
123- if [[ -n $ALLOWPLUGINS ]] && [[ $ALLOWPLUGINS =~ ^(true| false)$ ]]; then
124- echo " Setting plugins... $ALLOWPLUGINS "
123+ if [[ -n $ALLOW_PLUGINS ]] && [[ $ALLOW_PLUGINS =~ ^(true| false)$ ]]; then
124+ echo " Setting plugins... $ALLOW_PLUGINS "
125125
126126 sed -i ' s/"_plugins"/"plugins"/' " $CONFIG_FILE "
127- jq --argjson allow_plugins " $ALLOWPLUGINS " \
127+ jq --argjson allow_plugins " $ALLOW_PLUGINS " \
128128 ' .settings.plugins.enabled = $allow_plugins' \
129129 " $CONFIG_FILE " > temp_config.json && mv temp_config.json " $CONFIG_FILE "
130130 else
131- echo " Invalid or no ALLOWPLUGINS value given, commenting out so default applies... Value given: $ALLOWPLUGINS "
131+ echo " Invalid or no ALLOWPLUGINS value given, commenting out so default applies... Value given: $ALLOW_PLUGINS "
132132 sed -i ' s/"plugins":/"_plugins":/g' " $CONFIG_FILE "
133133 fi
134134
@@ -193,15 +193,15 @@ if [[ "$DYNAMIC_CONFIG" =~ ^(true|yes)$ ]]; then
193193 fi
194194
195195 # LOCALSESSIONRECORDING
196- if [[ -n $LOCALSESSIONRECORDING ]] && [[ $LOCALSESSIONRECORDING =~ ^(true| false)$ ]]; then
197- echo " Setting localSessionRecording... $LOCALSESSIONRECORDING "
196+ if [[ -n $LOCAL_SESSION_RECORDING ]] && [[ $LOCAL_SESSION_RECORDING =~ ^(true| false)$ ]]; then
197+ echo " Setting localSessionRecording... $LOCAL_SESSION_RECORDING "
198198
199199 sed -i ' s/"_localSessionRecording"/"localSessionRecording"/' " $CONFIG_FILE "
200- jq --argjson session_recording " $LOCALSESSIONRECORDING " \
200+ jq --argjson session_recording " $LOCAL_SESSION_RECORDING " \
201201 ' .domains[""].localSessionRecording = $session_recording' \
202202 " $CONFIG_FILE " > temp_config.json && mv temp_config.json " $CONFIG_FILE "
203203 else
204- echo " Invalid or no LOCALSESSIONRECORDING value given, commenting out so default applies... Value given: $LOCALSESSIONRECORDING "
204+ echo " Invalid or no LOCALSESSIONRECORDING value given, commenting out so default applies... Value given: $LOCAL_SESSION_RECORDING "
205205 sed -i ' s/"localSessionRecording":/"_localSessionRecording":/g' " $CONFIG_FILE "
206206 fi
207207
0 commit comments