From 836f491ca51bd803e7ce3e0ca8ac3e4c002ecbb6 Mon Sep 17 00:00:00 2001 From: Ayron Jungren Date: Sun, 24 Nov 2019 16:09:45 -0500 Subject: [PATCH] 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. --- docker/entrypoint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 4124af4..3ff07c9 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -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/