From 731e227b9e03764e3b4b212b902ba2d208bb984e Mon Sep 17 00:00:00 2001 From: morris-kamau Date: Tue, 9 Jan 2024 16:51:39 +0300 Subject: [PATCH 1/2] modify the autocofig public IP to use flr DNS instead of ipfy --- entrypoint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index f5d7305a..0e69109b 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -7,7 +7,7 @@ then if [ "$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!" @@ -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 \ From 7052634c8b7216fb3fab67716156c094d81d9a02 Mon Sep 17 00:00:00 2001 From: morris-kamau Date: Tue, 9 Jan 2024 16:59:07 +0300 Subject: [PATCH 2/2] change empty var check for publicIP --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 0e69109b..4dfc5707 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -4,7 +4,7 @@ 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 -m 10 https://flare.network/cdn-cgi/trace | grep 'ip=' | cut -d'=' -f2)