sorted.
Daan committed
Mar 23, 2025 at 23:13 UTC
7f0f12a2e031c1a2b7e33afaab10da80a35772e4
1 file changed
+40
-40
docker/entrypoint.sh
+40
-40
@@ -119,19 +119,6 @@ if [[ "$DYNAMIC_CONFIG" =~ ^(true|yes)$ ]]; then
119
"$CONFIG_FILE" > temp_config.json && mv temp_config.json "$CONFIG_FILE"
120
fi
121
122
- # ALLOW_NEW_ACCOUNTS
123
- if [[ -n $ALLOW_NEW_ACCOUNTS ]] && [[ $ALLOW_NEW_ACCOUNTS =~ ^(true|false)$ ]]; then
124
- echo "Setting NewAccounts... $ALLOW_NEW_ACCOUNTS"
125
-
126
- sed -i 's/"_NewAccounts"/"NewAccounts"/' "$CONFIG_FILE"
127
- jq --argjson new_accounts "$ALLOW_NEW_ACCOUNTS" \
128
- '.domains[""].NewAccounts = $new_accounts' \
129
- "$CONFIG_FILE" > temp_config.json && mv temp_config.json "$CONFIG_FILE"
130
- else
131
- echo "Invalid or no ALLOW_NEW_ACCOUNTS value given, commenting out so default applies... Value given: $ALLOW_NEW_ACCOUNTS"
132
- sed -i 's/"NewAccounts":/"_NewAccounts":/g' "$CONFIG_FILE"
133
- fi
134
-
122
# ALLOWPLUGINS
123
if [[ -n $ALLOWPLUGINS ]] && [[ $ALLOWPLUGINS =~ ^(true|false)$ ]]; then
124
echo "Setting plugins... $ALLOWPLUGINS"
@@ -145,33 +132,6 @@ if [[ "$DYNAMIC_CONFIG" =~ ^(true|yes)$ ]]; then
132
sed -i 's/"plugins":/"_plugins":/g' "$CONFIG_FILE"
133
fi
134
148
- # LOCALSESSIONRECORDING
149
- if [[ -n $LOCALSESSIONRECORDING ]] && [[ $LOCALSESSIONRECORDING =~ ^(true|false)$ ]]; then
150
- echo "Setting localSessionRecording... $LOCALSESSIONRECORDING"
151
-
152
- sed -i 's/"_localSessionRecording"/"localSessionRecording"/' "$CONFIG_FILE"
153
- jq --argjson session_recording "$LOCALSESSIONRECORDING" \
154
- '.domains[""].localSessionRecording = $session_recording' \
155
- "$CONFIG_FILE" > temp_config.json && mv temp_config.json "$CONFIG_FILE"
156
- else
157
- echo "Invalid or no LOCALSESSIONRECORDING value given, commenting out so default applies... Value given: $LOCALSESSIONRECORDING"
158
- sed -i 's/"localSessionRecording":/"_localSessionRecording":/g' "$CONFIG_FILE"
159
- fi
160
-
161
- # MINIFY
162
- if [[ -n $MINIFY ]] && [[ $MINIFY =~ ^(true|false)$ ]]; then
163
- echo "Setting minify... $MINIFY"
164
-
165
- sed -i 's/"_minify"/"minify"/' "$CONFIG_FILE"
166
- jq --arg minify "$MINIFY" \
167
- '.domains[""].minify = $minify' \
168
- "$CONFIG_FILE" > temp_config.json && mv temp_config.json "$CONFIG_FILE"
169
- #sed -i "s/\"minify\": *[a-z]*/\"minify\": $MINIFY/" "$CONFIG_FILE"
170
- else
171
- echo "Invalid or no MINIFY value given, commenting out so default applies... Value given: $MINIFY"
172
- sed -i 's/"minify":/"_minify":/g' "$CONFIG_FILE"
173
- fi
174
-
135
# WEBRTC
136
if [[ -n $WEBRTC ]] && [[ $WEBRTC =~ ^(true|false)$ ]]; then
137
echo "Setting WebRTC... $WEBRTC"
@@ -199,6 +159,46 @@ if [[ "$DYNAMIC_CONFIG" =~ ^(true|yes)$ ]]; then
159
sed -i 's/"AllowFraming":/"_AllowFraming":/g' "$CONFIG_FILE"
160
fi
161
162
+ # ALLOW_NEW_ACCOUNTS
163
+ if [[ -n $ALLOW_NEW_ACCOUNTS ]] && [[ $ALLOW_NEW_ACCOUNTS =~ ^(true|false)$ ]]; then
164
+ echo "Setting NewAccounts... $ALLOW_NEW_ACCOUNTS"
165
+
166
+ sed -i 's/"_NewAccounts"/"NewAccounts"/' "$CONFIG_FILE"
167
+ jq --argjson new_accounts "$ALLOW_NEW_ACCOUNTS" \
168
+ '.domains[""].NewAccounts = $new_accounts' \
169
+ "$CONFIG_FILE" > temp_config.json && mv temp_config.json "$CONFIG_FILE"
170
+ else
171
+ echo "Invalid or no ALLOW_NEW_ACCOUNTS value given, commenting out so default applies... Value given: $ALLOW_NEW_ACCOUNTS"
172
+ sed -i 's/"NewAccounts":/"_NewAccounts":/g' "$CONFIG_FILE"
173
+ fi
174
+
175
+ # LOCALSESSIONRECORDING
176
+ if [[ -n $LOCALSESSIONRECORDING ]] && [[ $LOCALSESSIONRECORDING =~ ^(true|false)$ ]]; then
177
+ echo "Setting localSessionRecording... $LOCALSESSIONRECORDING"
178
+
179
+ sed -i 's/"_localSessionRecording"/"localSessionRecording"/' "$CONFIG_FILE"
180
+ jq --argjson session_recording "$LOCALSESSIONRECORDING" \
181
+ '.domains[""].localSessionRecording = $session_recording' \
182
+ "$CONFIG_FILE" > temp_config.json && mv temp_config.json "$CONFIG_FILE"
183
+ else
184
+ echo "Invalid or no LOCALSESSIONRECORDING value given, commenting out so default applies... Value given: $LOCALSESSIONRECORDING"
185
+ sed -i 's/"localSessionRecording":/"_localSessionRecording":/g' "$CONFIG_FILE"
186
+ fi
187
+
188
+ # MINIFY
189
+ if [[ -n $MINIFY ]] && [[ $MINIFY =~ ^(true|false)$ ]]; then
190
+ echo "Setting minify... $MINIFY"
191
+
192
+ sed -i 's/"_minify"/"minify"/' "$CONFIG_FILE"
193
+ jq --arg minify "$MINIFY" \
194
+ '.domains[""].minify = $minify' \
195
+ "$CONFIG_FILE" > temp_config.json && mv temp_config.json "$CONFIG_FILE"
196
+ #sed -i "s/\"minify\": *[a-z]*/\"minify\": $MINIFY/" "$CONFIG_FILE"
197
+ else
198
+ echo "Invalid or no MINIFY value given, commenting out so default applies... Value given: $MINIFY"
199
+ sed -i 's/"minify":/"_minify":/g' "$CONFIG_FILE"
200
+ fi
201
+
202
# ALLOWED_ORIGIN
203
if [[ -n $ALLOWED_ORIGIN ]] && [[ $ALLOWED_ORIGIN =~ ^(true|false)$ ]]; then
204
echo "Setting allowedOrigin... $ALLOWED_ORIGIN"