Fixup bugs with updated backup scripts

This commit is contained in:
Johannes Zellner
2016-12-07 10:47:06 +01:00
parent 01631e0477
commit b2dbb5a100
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ if [[ "$1" == "s3" ]]; then
readonly endpoint_url="$6"
readonly password="$7"
if [ $# -gt 6 ]; then
if [ $# -gt 7 ]; then
export AWS_SESSION_TOKEN="$8"
fi
fi
+2 -1
View File
@@ -29,12 +29,13 @@ function getBackupCredentials(apiConfig, callback) {
var credentials = {
signatureVersion: 'v4',
s3ForcePathStyle: true,
accessKeyId: apiConfig.accessKeyId,
secretAccessKey: apiConfig.secretAccessKey,
region: apiConfig.region || 'us-east-1'
};
if (apiConfig.endpoint) credentials.endpoint = new AWS.Endpoint(apiConfig.endpoint);
if (apiConfig.endpoint) credentials.endpoint = apiConfig.endpoint;
callback(null, credentials);
}