From 294c8a8220fb10296f8ca3b05c4577cb41829a9e Mon Sep 17 00:00:00 2001 From: Jon Higgs Date: Mon, 28 Jan 2013 17:18:28 +0100 Subject: [PATCH] use $EC2_REGION if has been set. --- ec2-automate-backup/ec2-automate-backup.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ec2-automate-backup/ec2-automate-backup.sh b/ec2-automate-backup/ec2-automate-backup.sh index 7ac4299..833d9d0 100755 --- a/ec2-automate-backup/ec2-automate-backup.sh +++ b/ec2-automate-backup/ec2-automate-backup.sh @@ -150,7 +150,12 @@ app_name=`basename $0` #sets defaults selection_method="volumeid" -region="us-east-1" +if [ -z $EC2_REGION ]; + then region="us-east-1" +else + region="$EC2_REGION" +fi + #date_binary allows a user to set the "date" binary that is installed on their system and, therefore, the options that will be given to the date binary to perform date calculations date_binary=""