Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #11 from MarkBennett/only-run-on-running-instances

Ignore any EC2 instances that are not running
  • Loading branch information...
commit ef4ccd62e5daf2107e354939bb6e8f8d7208037c 2 parents f943af2 + 5c7df5c
@mm53bar mm53bar authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  bin/plow
View
2  bin/plow
@@ -85,7 +85,7 @@ else
INSTANCE_NAMES=($(echo "${DESCRIBE_TAG}" | grep TAG | awk {'print $3'}))
for instance in ${INSTANCE_NAMES[@]}; do
- DESCRIBE_INSTANCE=$(ec2-describe-instances $instance)
+ DESCRIBE_INSTANCE=$(ec2-describe-instances --filter "instance-state-name=running" $instance)
SERVERS[${#SERVERS[@]}]=$(echo ${DESCRIBE_INSTANCE} | sed -E 's/RESERVATION.*ami-.{9}//' | sed -E 's/\ .*//')
done
fi
Please sign in to comment.
Something went wrong with that request. Please try again.