Generate passwords only if modules are enabled

This commit is contained in:
juarez
2023-07-19 13:45:14 +02:00
parent 5684307539
commit c03e85cfca
3 changed files with 13 additions and 13 deletions

View File

@ -1,8 +1,8 @@
#!/bin/bash
if [ -n "$ENABLE_EXPORTER" ];then
if [ -n "$ENABLE_EXPORTER" ]; then
log INFO "Exporter setup detected -- will start Exporter service."
OVERRIDE+=" -f ./$PROJECT/modules/exporter-compose.yml"
# TODO: Generate password in another way so that not all passwords are the same?
EXPORTER_DB_PASSWORD="$(echo \"This is a salt string to generate one consistent password for the exporter. It is not required to be secret.\" | openssl rsautl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 30)"
fi
# TODO: Generate password in another way so that not all passwords are the same?
EXPORTER_DB_PASSWORD="$(echo \"This is a salt string to generate one consistent password for the exporter. It is not required to be secret.\" | openssl rsautl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 30)"