Files
zulip/puppet/zulip_internal/files/postgresql/env-wal-e
Anders Kaseorg 0d12dfd06f Improve shell quoting hygiene
Most of these problems were found by ShellCheck
(http://www.shellcheck.net).

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2015-09-25 23:25:08 -04:00

15 lines
463 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 "$@"