Skip to content
This repository was archived by the owner on Jul 27, 2021. It is now read-only.

Commit 714357a

Browse files
committed
adding instance support
1 parent 9689da7 commit 714357a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

startup.sh

100644100755
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ case "${NETWORK}" in
2424
;;
2525
esac
2626

27+
# Am I on ec2 instances?
28+
if [[ ${zone} == "unknown" ]]; then
29+
zone=$(curl -m2 -s http://169.254.169.254/latest/dynamic/instance-identity/document | jq -r '.availabilityZone' | cut -f3 -d-)
30+
fi
31+
2732
export CODE_HASH="$(cat code_hash.txt)"
2833
export AZ="${IP} in AZ-${zone}"
2934

0 commit comments

Comments
 (0)