Skip to content

Commit fec7cf2

Browse files
committed
using right variable, and reporting on the account when killing an instance
1 parent e72b10a commit fec7cf2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

aws/kill_instances.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ if [ -z "$ACC" ]; then
1414
exit 1
1515
fi
1616

17-
init_ec2_env $ACCOUNT
17+
init_ec2_env $ACC
1818

1919
# go through each running instance
2020
for id in `ec2-describe-instances | grep "^INSTANCE" | cut -f 2` ;do
@@ -23,7 +23,7 @@ for id in `ec2-describe-instances | grep "^INSTANCE" | cut -f 2` ;do
2323
# check for a tag
2424
ec2-describe-instances | grep "^TAG" | grep "$id" | grep "persist"
2525
if [ $? != 0 ]; then
26-
echo "killing instance $id"
26+
echo "killing instance $id in account $ACC"
2727
ec2-terminate-instances $id
2828
fi
2929
fi

0 commit comments

Comments
 (0)