mirror of
https://github.com/garraflavatra/docker-volume-s3-backup.git
synced 2025-05-17 13:14:38 +00:00
make access id/key optional (closes #21)
This commit is contained in:
parent
60c0ff5fc4
commit
ea7d8e77bb
@ -3,16 +3,6 @@
|
|||||||
set -eu
|
set -eu
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
if [ -z "$S3_ACCESS_KEY_ID" ]; then
|
|
||||||
echo "You need to set the S3_ACCESS_KEY_ID environment variable."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$S3_SECRET_ACCESS_KEY" ]; then
|
|
||||||
echo "You need to set the S3_SECRET_ACCESS_KEY environment variable."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$S3_BUCKET" ]; then
|
if [ -z "$S3_BUCKET" ]; then
|
||||||
echo "You need to set the S3_BUCKET environment variable."
|
echo "You need to set the S3_BUCKET environment variable."
|
||||||
exit 1
|
exit 1
|
||||||
@ -50,8 +40,12 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
export AWS_ACCESS_KEY_ID=$S3_ACCESS_KEY_ID
|
if [ -n "$S3_ACCESS_KEY_ID" ]; then
|
||||||
export AWS_SECRET_ACCESS_KEY=$S3_SECRET_ACCESS_KEY
|
export AWS_ACCESS_KEY_ID=$S3_ACCESS_KEY_ID
|
||||||
|
fi
|
||||||
|
if [ -n "$S3_SECRET_ACCESS_KEY" ]; then
|
||||||
|
export AWS_SECRET_ACCESS_KEY=$S3_SECRET_ACCESS_KEY
|
||||||
|
fi
|
||||||
export AWS_DEFAULT_REGION=$S3_REGION
|
export AWS_DEFAULT_REGION=$S3_REGION
|
||||||
export PGPASSWORD=$POSTGRES_PASSWORD
|
export PGPASSWORD=$POSTGRES_PASSWORD
|
||||||
|
|
||||||
|
@ -3,16 +3,6 @@
|
|||||||
set -u
|
set -u
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
if [ -z "$S3_ACCESS_KEY_ID" ]; then
|
|
||||||
echo "You need to set the S3_ACCESS_KEY_ID environment variable."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$S3_SECRET_ACCESS_KEY" ]; then
|
|
||||||
echo "You need to set the S3_SECRET_ACCESS_KEY environment variable."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$S3_BUCKET" ]; then
|
if [ -z "$S3_BUCKET" ]; then
|
||||||
echo "You need to set the S3_BUCKET environment variable."
|
echo "You need to set the S3_BUCKET environment variable."
|
||||||
exit 1
|
exit 1
|
||||||
@ -52,8 +42,12 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
export AWS_ACCESS_KEY_ID=$S3_ACCESS_KEY_ID
|
if [ -n "$S3_ACCESS_KEY_ID" ]; then
|
||||||
export AWS_SECRET_ACCESS_KEY=$S3_SECRET_ACCESS_KEY
|
export AWS_ACCESS_KEY_ID=$S3_ACCESS_KEY_ID
|
||||||
|
fi
|
||||||
|
if [ -n "$S3_SECRET_ACCESS_KEY" ]; then
|
||||||
|
export AWS_SECRET_ACCESS_KEY=$S3_SECRET_ACCESS_KEY
|
||||||
|
fi
|
||||||
export AWS_DEFAULT_REGION=$S3_REGION
|
export AWS_DEFAULT_REGION=$S3_REGION
|
||||||
export PGPASSWORD=$POSTGRES_PASSWORD
|
export PGPASSWORD=$POSTGRES_PASSWORD
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user