Files
zulip/puppet/zulip_internal/files/postgresql/env-wal-e
Zev Benjamin 20e4e31dcf puppet: Update env-wal-e to take the S3 bucket to use from /etc/zulip/zulip.conf
This will let us do normal puppet applies on our postgres hosts again.

Crudini is already installed and /etc/zulip/zulip.conf has already been edited
on the relevant hosts.

(imported from commit 8e2b88d2fe2f7b2367ecb73a50a299200fe381a0)
2014-01-16 15:23:21 -05:00

15 lines
459 B
Bash
Executable File

#!/bin/sh
if [ -z "$ZULIP_CONF" ]; then
ZULIP_CONF=/etc/zulip/zulip.conf
fi
export AWS_ACCESS_KEY_ID=xxxxxxxxxxxxxxxxxxxx
export AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
s3_backup_bucket=$(crudini --get $ZULIP_CONF database s3_backup_bucket 2>&1)
if [ $? -ne 0 ]; then
echo "Could not determine which s3 bucket to use:" $s3_backup_bucket
exit 1
fi
export WALE_S3_PREFIX=s3://$s3_backup_bucket
exec /usr/local/bin/wal-e "$@"