Skip to content

Commit

Permalink
Merge pull request #24 from flare-foundation/mod-public-ip-auto-config
Browse files Browse the repository at this point in the history
modify the autocofig public IP to use flr DNS instead of ipfy
  • Loading branch information
mboben authored Jan 10, 2024
2 parents e9e457e + 7052634 commit 44079ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ set -eo pipefail

if [ "$AUTOCONFIGURE_PUBLIC_IP" = "1" ];
then
if [ "$PUBLIC_IP" = "" ];
if [ -z "$PUBLIC_IP" ];
then
echo "Autoconfiguring public IP"
PUBLIC_IP=$(curl -s 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!"
Expand Down Expand Up @@ -49,7 +49,7 @@ then
echo " Got bootstrap ids: '${BOOTSTRAP_IDS}'"
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 44079ee

Please sign in to comment.