diff --git a/minione b/minione index b16db30..70ee6dc 100755 --- a/minione +++ b/minione @@ -482,6 +482,11 @@ node() { [[ $NODE == yes ]] } +aws() { + # try detect AWS instance by seeing 'Server: EC2ws' in headers + curl --connect-timeout 1 http://169.254.169.254 -v 2>&1 | grep -q EC2 +} + kvm() { [[ $NODE == yes && $LXC == no ]] } @@ -951,6 +956,11 @@ else REPORT_IP=${PUBLIC_IP:-$ETH0_IP} fi +# On AWS report PUBLIC_IP, if exists +if aws; then + REPORT_IP=${PUBLIC_IP:-$ETH0_IP} +fi + lxc && MARKET_APP_NAME='alpine' #-------------------------------------------------------------------------------