mirror of
https://github.com/ACINQ/eclair.git
synced 2025-03-13 11:35:47 +01:00
Front: use IMDSv2 to retrieve the instance ip (#2146)
This is used by the built-in AWS Beanstalk package.
This commit is contained in:
parent
8758d50df2
commit
75ef66e54c
1 changed files with 3 additions and 1 deletions
|
@ -1,4 +1,6 @@
|
|||
export LOCAL_IP=$(curl -s 169.254.169.254/latest/meta-data/local-ipv4)
|
||||
# see https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-retrieval.html
|
||||
TOKEN_IMDSV2=$(curl -s -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600")
|
||||
export LOCAL_IP=$(curl -s -H "X-aws-ec2-metadata-token: $TOKEN_IMDSV2" http://169.254.169.254/latest/meta-data/local-ipv4)
|
||||
export HOSTNAME=$(hostname)
|
||||
|
||||
# make the eclair home directory
|
||||
|
|
Loading…
Add table
Reference in a new issue