Skip to content

Commit

Permalink
M #-: Report public IP in aws
Browse files Browse the repository at this point in the history
  • Loading branch information
xorel committed Sep 18, 2023
1 parent 78cbd7a commit 7733e67
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 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 7733e67

Please sign in to comment.