From f57033dff0317990fcef8c035dcaaa0c2396c0bf Mon Sep 17 00:00:00 2001 From: liortamary Date: Thu, 24 Mar 2022 00:13:05 +0200 Subject: [PATCH] dont print password to container log --- docker/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/run.sh b/docker/run.sh index 97ef284..4679323 100755 --- a/docker/run.sh +++ b/docker/run.sh @@ -15,7 +15,7 @@ cp /etc/cassandra_exporter/config.yml /tmp/config.yml while IFS='=' read -r name value ; do if [[ $name == 'CASSANDRA_EXPORTER_CONFIG_'* ]]; then val="${!name}" - echo "$name $val" + if [[ $name == 'CASSANDRA_EXPORTER_CONFIG_password' ]]; then echo "$name ****"; else echo "$name $val"; fi field=$(echo $name | sed -r 's/CASSANDRA_EXPORTER_CONFIG_(.+)/\1/') sed -ri "s/^($field):.*/\1: $val/" "/tmp/config.yml" fi