From c33fbfc8bc88c8dc022b6a2b124710f730db7ba8 Mon Sep 17 00:00:00 2001 From: djuarezgf <46350150+djuarezgf@users.noreply.github.com> Date: Wed, 11 Jun 2025 09:34:41 +0200 Subject: [PATCH] fix: Create Exporter User only if Exporter is enabled (#317) --- lib/install-bridgehead.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/install-bridgehead.sh b/lib/install-bridgehead.sh index bc1a53b..f712153 100755 --- a/lib/install-bridgehead.sh +++ b/lib/install-bridgehead.sh @@ -49,8 +49,8 @@ if [ -z "$TRANSFAIR_AUTH" ]; then fi fi -if [ -z "$EXPORTER_USER" ]; then - log "INFO" "Now generating basic auth for the exporter and reporter (see adduser in bridgehead for more information). " +if [ "$ENABLE_EXPORTER" == "true" ] && [ -z "$EXPORTER_USER" ]; then + log "INFO" "Now generating basic auth for the exporter and reporter (see adduser in bridgehead for more information)." generated_passwd="$(cat /proc/sys/kernel/random/uuid | sed 's/[-]//g' | head -c 32)" add_basic_auth_user $PROJECT $generated_passwd "EXPORTER_USER" $PROJECT fi