Skip to content

Commit

Permalink
Merge pull request #674 from yorickdowne/main
Browse files Browse the repository at this point in the history
Allow user to override nag screen
  • Loading branch information
yorickdowne committed Jun 12, 2022
2 parents 4a0f86f + 30711d1 commit 792741e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
4 changes: 4 additions & 0 deletions default.env
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ RESTART=unless-stopped
# If you want debug logs, set this to debug instead of info
LOG_LEVEL=info

# If you run a distributed setup, setting this to DISTRIBUTED=true
# will stop the nag screens during ./ethd update
DISTRIBUTED=

# You can set specific version targets and choose
# binary or compiled from source builds below,
# via `Dockerfile.binary` or `Dockerfile.source`
Expand Down
13 changes: 10 additions & 3 deletions ethd
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ envmigrate() {
fi
ALL_VARS=( COMPOSE_FILE REWARDS_TO EL_NODE EL_FALLBACK_NODE1 EL_FALLBACK_NODE2 GRAFFITI NETWORK EL_NETWORK \
CL_MAX_PEER_COUNT CL_MIN_PEER_COUNT EL_MAX_PEER_COUNT EL_MIN_PEER_COUNT DOMAIN ACME_EMAIL CF_EMAIL \
CF_API_TOKEN AWS_PROFILE AWS_HOSTED_ZONE_ID GRAFANA_HOST \
CF_API_TOKEN AWS_PROFILE AWS_HOSTED_ZONE_ID GRAFANA_HOST DISTRIBUTED \
PROM_HOST PRYSM_HOST EL_HOST EL_WS_HOST DDNS_SUBDOMAIN DDNS_PROXY RAPID_SYNC_URL \
CL_NODE BEACON_STATS_API BEACON_STATS_MACHINE EL_P2P_PORT CL_P2P_PORT PRYSM_PORT \
PRYSM_UDP_PORT GRAFANA_PORT KEY_API_PORT TRAEFIK_WEB_PORT TRAEFIK_WEB_HTTP_PORT \
Expand Down Expand Up @@ -426,18 +426,25 @@ envmigrate() {
query_coinbase
set_value_in_env
fi
# User signals it's a distributed setup and not to nag
var="DISTRIBUTED"
value=$(grep --color=never -Po "^${var}=\K.*" ".env.source" || true)
if [ "${value}" = "true" ]; then
rm .env.source
return
fi
# Check for CL and EL
var="COMPOSE_FILE"
value=$(grep --color=never -Po "^${var}=\K.*" ".env.source" || true)
# Case 1 ... CL, do we have an EL?
if [[ "${value}" =~ "-base.yml" ]]; then
if [[ ! "${value}" =~ "geth.yml" && ! "${value}" =~ "besu.yml" && ! "${value}" =~ "erigon.yml" && ! "${value}" =~ "nm.yml" ]]; then
whiptail --msgbox "An Execution Layer client is required alongside your Consensus Layer client come Ethereum Merge. Refer to eth-docker docs (https://eth-docker.net/docs/About/MergePrep) for more information.\n\nPlease start running your own EL soonest, Infura will no longer be usable after The Merge" 16 75
whiptail --msgbox "An Execution Layer client is required alongside your Consensus Layer client come Ethereum Merge. Refer to eth-docker docs (https://eth-docker.net/docs/About/MergePrep) for more information.\n\nPlease start running your own EL soonest, as Infura will no longer be usable as an EL after The Merge.\n\nIf you run a distributed setup, you can shut off this nag screen by setting DISTRIBUTED=true in .env" 16 75
fi
# Case 2 ... EL, do we have a CL?
elif [[ "${value}" =~ "geth.yml" || "${value}" =~ "besu.yml" || "${value}" =~ "erigon.yml" || "${value}" =~ "nm.yml" ]]; then
if [[ ! "${value}" =~ "-base.yml" ]]; then
whiptail --msgbox "A Consensus Layer client is required alongside your Execution Layer client come Ethereum Merge. Refer to eth-docker docs (https://eth-docker.net/docs/About/MergePrep) for more information.\n\nPlease start running your own CL soonest, an EL alone will no longer be usable after The Merge" 16 75
whiptail --msgbox "A Consensus Layer client is required alongside your Execution Layer client come Ethereum Merge. Refer to eth-docker docs (https://eth-docker.net/docs/About/MergePrep) for more information.\n\nPlease start running your own CL soonest, as an EL alone will no longer be usable after The Merge.\n\nIf you run a distributed setup, you can shut off this nag screen by setting DISTRIBUTED=true in .env" 16 75
fi
fi
rm .env.source
Expand Down

0 comments on commit 792741e

Please sign in to comment.