fix: Create Exporter User only if Exporter is enabled (#317)

This commit is contained in:
djuarezgf
2025-06-11 09:34:41 +02:00
committed by GitHub
parent faa8abd4ee
commit c33fbfc8bc

View File

@ -49,7 +49,7 @@ if [ -z "$TRANSFAIR_AUTH" ]; then
fi fi
fi fi
if [ -z "$EXPORTER_USER" ]; then 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)." 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)" generated_passwd="$(cat /proc/sys/kernel/random/uuid | sed 's/[-]//g' | head -c 32)"
add_basic_auth_user $PROJECT $generated_passwd "EXPORTER_USER" $PROJECT add_basic_auth_user $PROJECT $generated_passwd "EXPORTER_USER" $PROJECT