Skip to content

Commit

Permalink
modify the autocofig public IP to use flr DNS instead of ipfy
Browse files Browse the repository at this point in the history
# Conflicts:
#	entrypoint.sh
  • Loading branch information
mkamau-flr authored and mboben committed Jan 10, 2024
1 parent 7d2b43a commit 7a8ec28
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ then
if [ "$PUBLIC_IP" = "" ];
then
echo "Autoconfiguring public IP"
PUBLIC_IP=$(curl https://api.ipify.org/)
PUBLIC_IP=$(curl -s -m 10 https://flare.network/cdn-cgi/trace | grep 'ip=' | cut -d'=' -f2)
echo " Got public address '${PUBLIC_IP}'"
else
echo "/!\\ AUTOCONFIGURE_PUBLIC_IP is enabled, but PUBLIC_IP is already set to '$PUBLIC_IP'! Skipping autoconfigure and using current PUBLIC_IP value!"
fi
Expand All @@ -28,7 +29,7 @@ then
BOOTSTRAP_IDS=$(curl -m 10 -sX POST --data '{ "jsonrpc":"2.0", "id":1, "method":"info.getNodeID" }' -H 'content-type:application/json;' "$AUTOCONFIGURE_BOOTSTRAP_ENDPOINT" | jq -r ".result.nodeID")
fi

/app/build/avalanchego \
exec /app/build/avalanchego \
--http-host=$HTTP_HOST \
--http-port=$HTTP_PORT \
--staking-port=$STAKING_PORT \
Expand Down

0 comments on commit 7a8ec28

Please sign in to comment.