diff --git a/Dockerfile b/Dockerfile index da796c9..52e3ae0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,9 +6,6 @@ RUN go install github.com/zeta-chain/dl-pipe/cmd/dl-pipe@latest FROM debian:bookworm AS base -RUN mkdir -p /root/.zetacored/cosmovisor/genesis/bin && \ - ln -s /root/.zetacored/cosmovisor/genesis /root/.zetacored/cosmovisor/current - ENV PATH=/root/.zetacored/cosmovisor/current/bin/:${PATH} RUN apt update && \ diff --git a/init.sh b/init.sh index 4527b33..40fb5bd 100755 --- a/init.sh +++ b/init.sh @@ -66,6 +66,14 @@ download_configs() { install_genesis_zetacored() { echo "Installing genesis zetacored" + + # create the genesis bin path and symlink it to the current path + genesis_path=".zetacored/cosmovisor/genesis" + mkdir -p "$genesis_path" + mkdir -p "${genesis_path}/bin" + current_path=".zetacored/cosmovisor/current" + ln -s "${HOME}/${genesis_path}" "${HOME}/${current_path}" + if [[ -z $ZETACORED_BINARY_URL ]]; then max_height=$($CURL "${ZETACHAIN_SNAPSHOT_METADATA_URL}" | jq -r '.snapshots[0].height') echo "Getting latest passed upgrade plan before ${max_height}"