From be68f91f5c0a5d43968e5ae6d412a30448bf3c8b Mon Sep 17 00:00:00 2001 From: Zahary Karadjov Date: Tue, 26 Jul 2022 14:03:57 +0300 Subject: [PATCH] Honor the WEB3_URL env var in the run-node scripts to preserve backward compatibility --- scripts/run-beacon-node.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/run-beacon-node.sh b/scripts/run-beacon-node.sh index f608aa11c..f3976f4d5 100755 --- a/scripts/run-beacon-node.sh +++ b/scripts/run-beacon-node.sh @@ -23,9 +23,6 @@ if [[ "$1" == "-h" || "$1" == "--help" ]]; then All supplied options will be forwarded to the beacon node executable. Please execute build/$NBC_BINARY --help to get more information. - To suppress the interactive input required by this script, you can - specify WEB3_URL as an environment variable. - HELP exit 0 fi @@ -58,6 +55,11 @@ MISSING_BINARY_HELP exit 1 fi +WEB3_URL_ARG="" +if [[ "$WEB3_URL" != "" ]]; then + WEB3_URL_ARG="--web3-url=${WEB3_URL}" +fi + # Allow the binary to receive signals directly. exec ${WINPTY} build/${NBC_BINARY} \ --network=${NETWORK} \ @@ -67,5 +69,5 @@ exec ${WINPTY} build/${NBC_BINARY} \ --rest \ --rest-port=$(( ${BASE_REST_PORT} + ${NODE_ID} )) \ --metrics \ - ${EXTRA_ARGS} \ + ${WEB3_URL_ARG} ${EXTRA_ARGS} \ "$@"