Last active
December 5, 2017 14:57
-
-
Save smant/cd88ba75502dc68bfd3f07c700cc6845 to your computer and use it in GitHub Desktop.
aws ecs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ "$AWS" != "" ] ; then | |
if which curl 1>/dev/null; then | |
AWS_EC2_LOCAL_IPV4=`curl --connect-timeout=1 http://169.254.169.254/latest/meta-data/local-ipv4 2>/dev/null` | |
else | |
if which wget 1>/dev/null; then | |
AWS_EC2_LOCAL_IPV4=`wget -q -O - http://169.254.169.254/latest/meta-data/local-ipv4` | |
fi | |
fi | |
export AWS_EC2_LOCAL_IPV4=$AWS_EC2_LOCAL_IPV4 | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment