Skip to content

Commit

Permalink
Merge pull request #6 from mozilla/fix/mediasoup_announced_ip
Browse files Browse the repository at this point in the history
add -f when curling so that MEDIASOUP_ANNOUNCED_IP doesn't get set to…
  • Loading branch information
InfiniteLee authored Jun 30, 2020
2 parents 0958bfd + 90b07c2 commit 758058a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions habitat/hooks/run
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ export MEDIASOUP_MAX_PORT=$(echo "{{ cfg.media.rtp_port_range }}" | cut -d- -f2)

# HACKY - need to inject public IP here. Since not configured in legacy package for janus.
# AWS
export MEDIASOUP_ANNOUNCED_IP=$(curl -s http://169.254.169.254/latest/meta-data/public-ipv4)
export MEDIASOUP_ANNOUNCED_IP=$(curl -fs http://169.254.169.254/latest/meta-data/public-ipv4)

# DigitalOcean
if [[ -z "$MEDIASOUP_ANNOUNCED_IP" ]] ; then
export MEDIASOUP_ANNOUNCED_IP=$(curl "http://169.254.169.254/metadata/v1/interfaces/public/0/ipv4/address")
export MEDIASOUP_ANNOUNCED_IP=$(curl -fs "http://169.254.169.254/metadata/v1/interfaces/public/0/ipv4/address")
fi

# Fallback to first eth0 ip
Expand Down

0 comments on commit 758058a

Please sign in to comment.