Made names consistent
Daan Selen committed
Mar 25, 2025 at 15:16 UTC
9e6b98a031a6f1c23c5dd6ab41f3aae130c76a0b
1 file changed
+9
-9
docker/entrypoint.sh
+9
-9
@@ -93,7 +93,7 @@ if [[ "$DYNAMIC_CONFIG" =~ ^(true|yes)$ ]]; then
93
echo "If defaults are going to get applied, refer to: https://raw.githubusercontent.com/Ylianst/MeshCentral/master/meshcentral-config-schema.json"
94
95
# SESSIONKEY
96
- if [[ $REGENSESSIONKEY =~ ^(true|yes)$ ]]; then
96
+ if [[ $REGEN_SESSIONKEY =~ ^(true|yes)$ ]]; then
97
echo "Regenerating Session-Key because REGENSESSIONKEY is 'true' or 'yes'"
98
SESSION_KEY=$(tr -dc 'A-Z0-9' < /dev/urandom | fold -w 96 | head -n 1)
99
@@ -120,15 +120,15 @@ if [[ "$DYNAMIC_CONFIG" =~ ^(true|yes)$ ]]; then
120
fi
121
122
# 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"
125
126
sed -i 's/"_plugins"/"plugins"/' "$CONFIG_FILE"
127
- jq --argjson allow_plugins "$ALLOWPLUGINS" \
127
+ jq --argjson allow_plugins "$ALLOW_PLUGINS" \
128
'.settings.plugins.enabled = $allow_plugins' \
129
"$CONFIG_FILE" > temp_config.json && mv temp_config.json "$CONFIG_FILE"
130
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"
132
sed -i 's/"plugins":/"_plugins":/g' "$CONFIG_FILE"
133
fi
134
@@ -193,15 +193,15 @@ if [[ "$DYNAMIC_CONFIG" =~ ^(true|yes)$ ]]; then
193
fi
194
195
# 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"
198
199
sed -i 's/"_localSessionRecording"/"localSessionRecording"/' "$CONFIG_FILE"
200
- jq --argjson session_recording "$LOCALSESSIONRECORDING" \
200
+ jq --argjson session_recording "$LOCAL_SESSION_RECORDING" \
201
'.domains[""].localSessionRecording = $session_recording' \
202
"$CONFIG_FILE" > temp_config.json && mv temp_config.json "$CONFIG_FILE"
203
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"
205
sed -i 's/"localSessionRecording":/"_localSessionRecording":/g' "$CONFIG_FILE"
206
fi
207