mirror of https://github.com/zulip/zulip.git
env-wal-e: Eliminate hardcoding of AWS keys.
Pre-Zulip being open sourced, this file just had the AWS keys for backups hardcoded. Instead, these are simply read from zulip-secrets.conf.
This commit is contained in:
parent
3023745ed7
commit
81136ff092
|
@ -1,11 +1,11 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
if [ -z "$ZULIP_CONF" ]; then
|
if [ -z "$ZULIP_SECRETS_CONF" ]; then
|
||||||
ZULIP_CONF=/etc/zulip/zulip.conf
|
ZULIP_SECRETS_CONF=/etc/zulip/zulip-secrets.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export AWS_ACCESS_KEY_ID=xxxxxxxxxxxxxxxxxxxx
|
export AWS_ACCESS_KEY_ID=$(crudini --get "$ZULIP_SECRETS_CONF" secrets s3_backups_key)
|
||||||
export AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
export AWS_SECRET_ACCESS_KEY=$(crudini --get "$ZULIP_SECRETS_CONF" secrets s3_backups_secret_key)
|
||||||
s3_backup_bucket=$(crudini --get "$ZULIP_CONF" database s3_backup_bucket 2>&1)
|
s3_backup_bucket=$(crudini --get "$ZULIP_SECRETS_CONF" secrets s3_backup_bucket 2>&1)
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "Could not determine which s3 bucket to use:" "$s3_backup_bucket"
|
echo "Could not determine which s3 bucket to use:" "$s3_backup_bucket"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Reference in New Issue