From 60e66463147ec54dc231ed8a03918262bbf14f6b Mon Sep 17 00:00:00 2001 From: Mostafa Ghadimi Date: Tue, 19 Sep 2023 16:59:48 +0330 Subject: [PATCH] :hammer: feat: update the script in order to replace the password of users from .env file --- script.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/script.sh b/script.sh index 72ab95b..2e7a96b 100755 --- a/script.sh +++ b/script.sh @@ -2,8 +2,17 @@ source .env +echo "Start executing the script..." + sed -e "s/\$MINIO_CLICKHOUSE_BACKUP_BUCKET/${MINIO_CLICKHOUSE_BACKUP_BUCKET}/g" \ -e "s/\$MINIO_ACCESS_KEY_ID/${MINIO_ROOT_USER}/g" \ -e "s/\$MINIO_SECRET_ACCESS_KEY/${MINIO_ROOT_PASSWORD}/g" \ config_files/clickhouse/templates/storage-template.xml \ - > config_files/clickhouse/etc/clickhouse-server/config.d/storage.xml \ No newline at end of file + > config_files/clickhouse/etc/clickhouse-server/config.d/storage.xml + +sed -e "s/\$CLICKHOUSE_ADMIN_USER_PASSWORD/${CLICKHOUSE_ADMIN_USER_PASSWORD}/g" \ + -e "s/\$CLICKHOUSE_BUSINESS_INTELLIGENCE_USER_PASSWORD/${CLICKHOUSE_BUSINESS_INTELLIGENCE_USER_PASSWORD}/g" \ + config_files/clickhouse/templates/users.xml \ + > config_files/clickhouse/etc/clickhouse-server/config.d/users.xml + +echo "Successfully executed the script"