Skip to content

Commit

Permalink
M #-: Report public IP in aws (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
xorel authored Sep 21, 2023
1 parent fad76cc commit 0099e7b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions minione
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]]
}
Expand Down Expand Up @@ -951,6 +956,11 @@ else
REPORT_IP=${PUBLIC_IP:-$ETH0_IP}
fi

# On AWS always report PUBLIC_IP, if exists
if aws; then
REPORT_IP=${PUBLIC_IP:-$ETH0_IP}
fi

lxc && MARKET_APP_NAME='alpine'

#-------------------------------------------------------------------------------
Expand Down

0 comments on commit 0099e7b

Please sign in to comment.