mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-07-19 13:38:50 -04:00
Made names consistent
This commit is contained in:
parent
db7eacbca3
commit
9e6b98a031
@ -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"
|
echo "If defaults are going to get applied, refer to: https://raw.githubusercontent.com/Ylianst/MeshCentral/master/meshcentral-config-schema.json"
|
||||||
|
|
||||||
# SESSIONKEY
|
# SESSIONKEY
|
||||||
if [[ $REGENSESSIONKEY =~ ^(true|yes)$ ]]; then
|
if [[ $REGEN_SESSIONKEY =~ ^(true|yes)$ ]]; then
|
||||||
echo "Regenerating Session-Key because REGENSESSIONKEY is 'true' or 'yes'"
|
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)
|
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
|
fi
|
||||||
|
|
||||||
# ALLOWPLUGINS
|
# ALLOWPLUGINS
|
||||||
if [[ -n $ALLOWPLUGINS ]] && [[ $ALLOWPLUGINS =~ ^(true|false)$ ]]; then
|
if [[ -n $ALLOW_PLUGINS ]] && [[ $ALLOW_PLUGINS =~ ^(true|false)$ ]]; then
|
||||||
echo "Setting plugins... $ALLOWPLUGINS"
|
echo "Setting plugins... $ALLOW_PLUGINS"
|
||||||
|
|
||||||
sed -i 's/"_plugins"/"plugins"/' "$CONFIG_FILE"
|
sed -i 's/"_plugins"/"plugins"/' "$CONFIG_FILE"
|
||||||
jq --argjson allow_plugins "$ALLOWPLUGINS" \
|
jq --argjson allow_plugins "$ALLOW_PLUGINS" \
|
||||||
'.settings.plugins.enabled = $allow_plugins' \
|
'.settings.plugins.enabled = $allow_plugins' \
|
||||||
"$CONFIG_FILE" > temp_config.json && mv temp_config.json "$CONFIG_FILE"
|
"$CONFIG_FILE" > temp_config.json && mv temp_config.json "$CONFIG_FILE"
|
||||||
else
|
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"
|
sed -i 's/"plugins":/"_plugins":/g' "$CONFIG_FILE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -193,15 +193,15 @@ if [[ "$DYNAMIC_CONFIG" =~ ^(true|yes)$ ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# LOCALSESSIONRECORDING
|
# LOCALSESSIONRECORDING
|
||||||
if [[ -n $LOCALSESSIONRECORDING ]] && [[ $LOCALSESSIONRECORDING =~ ^(true|false)$ ]]; then
|
if [[ -n $LOCAL_SESSION_RECORDING ]] && [[ $LOCAL_SESSION_RECORDING =~ ^(true|false)$ ]]; then
|
||||||
echo "Setting localSessionRecording... $LOCALSESSIONRECORDING"
|
echo "Setting localSessionRecording... $LOCAL_SESSION_RECORDING"
|
||||||
|
|
||||||
sed -i 's/"_localSessionRecording"/"localSessionRecording"/' "$CONFIG_FILE"
|
sed -i 's/"_localSessionRecording"/"localSessionRecording"/' "$CONFIG_FILE"
|
||||||
jq --argjson session_recording "$LOCALSESSIONRECORDING" \
|
jq --argjson session_recording "$LOCAL_SESSION_RECORDING" \
|
||||||
'.domains[""].localSessionRecording = $session_recording' \
|
'.domains[""].localSessionRecording = $session_recording' \
|
||||||
"$CONFIG_FILE" > temp_config.json && mv temp_config.json "$CONFIG_FILE"
|
"$CONFIG_FILE" > temp_config.json && mv temp_config.json "$CONFIG_FILE"
|
||||||
else
|
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"
|
sed -i 's/"localSessionRecording":/"_localSessionRecording":/g' "$CONFIG_FILE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user