Skip to content

Commit

Permalink
adding instance support
Browse files Browse the repository at this point in the history
  • Loading branch information
brentley committed Mar 20, 2018
1 parent 9689da7 commit 714357a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions startup.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ case "${NETWORK}" in
;;
esac

# Am I on ec2 instances?
if [[ ${zone} == "unknown" ]]; then
zone=$(curl -m2 -s http:https://169.254.169.254/latest/dynamic/instance-identity/document | jq -r '.availabilityZone' | cut -f3 -d-)
fi

export CODE_HASH="$(cat code_hash.txt)"
export AZ="${IP} in AZ-${zone}"

Expand Down

0 comments on commit 714357a

Please sign in to comment.