mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-13 01:41:59 +00:00
Merge pull request #72857 from ClickHouse/setup-minio-creds
setup_minio: Do not add aws credentials twice
This commit is contained in:
commit
e83921d2cb
@ -120,6 +120,12 @@ setup_aws_credentials() {
|
|||||||
local minio_root_user=${MINIO_ROOT_USER:-clickhouse}
|
local minio_root_user=${MINIO_ROOT_USER:-clickhouse}
|
||||||
local minio_root_password=${MINIO_ROOT_PASSWORD:-clickhouse}
|
local minio_root_password=${MINIO_ROOT_PASSWORD:-clickhouse}
|
||||||
mkdir -p ~/.aws
|
mkdir -p ~/.aws
|
||||||
|
if [[ -f ~/.aws/credentials ]]; then
|
||||||
|
if grep -q "^\[default\]" ~/.aws/credentials; then
|
||||||
|
echo "The credentials file contains a [default] section."
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
fi
|
||||||
cat <<EOT >> ~/.aws/credentials
|
cat <<EOT >> ~/.aws/credentials
|
||||||
[default]
|
[default]
|
||||||
aws_access_key_id=${minio_root_user}
|
aws_access_key_id=${minio_root_user}
|
||||||
|
Loading…
Reference in New Issue
Block a user