Fix telemetry variables in Docker entrypoint (#254)

entrypoint.sh currently expects ENABLE_ID_OBFUSCATION and
REDACT_IP_ADDRESSES to be double-quoted strings but they are booleans.
This commit resolves the issue by removing the quotes in the regular
expressions.
This commit is contained in:
Ayron Jungren 2019-11-24 16:09:45 -05:00 committed by Federico Dossena
parent 326e30f213
commit 836f491ca5

View file

@ -41,11 +41,11 @@ if [[ "$TELEMETRY" == "true" && ( "$MODE" == "frontend" || "$MODE" == "standalon
sed -i s/\$stats_password=\".*\"/\$stats_password=\"$PASSWORD\"/g /var/www/html/results/telemetry_settings.php
if [ "$ENABLE_ID_OBFUSCATION" == "true" ]; then
sed -i s/\$enable_id_obfuscation=\".*\"/\$enable_id_obfuscation=\"true\"/g /var/www/html/results/telemetry_settings.php
sed -i s/\$enable_id_obfuscation=.*\;/\$enable_id_obfuscation=true\;/g /var/www/html/results/telemetry_settings.php
fi
if [ "$REDACT_IP_ADDRESSES" == "true" ]; then
sed -i s/\$redact_ip_addresses=\".*\"/\$redact_ip_addresses=\"true\"/g /var/www/html/results/telemetry_settings.php
sed -i s/\$redact_ip_addresses=.*\;/\$redact_ip_addresses=true\;/g /var/www/html/results/telemetry_settings.php
fi
mkdir -p /database/