From 751bb532e50828d2f63aff7a50ef6f1cd85e4efb Mon Sep 17 00:00:00 2001 From: Sebastian <379651+czarly@users.noreply.github.com> Date: Sun, 15 Jan 2023 09:31:01 +0100 Subject: [PATCH] init the arb classic node with a snapshot --- arbitrum/classic-entrypoint.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) mode change 100644 => 100755 arbitrum/classic-entrypoint.sh diff --git a/arbitrum/classic-entrypoint.sh b/arbitrum/classic-entrypoint.sh old mode 100644 new mode 100755 index c8209791..fd2d27bf --- a/arbitrum/classic-entrypoint.sh +++ b/arbitrum/classic-entrypoint.sh @@ -1,5 +1,13 @@ #!/bin/bash -echo "now we can download the db.tar file" +if [ -f /root/.arbitrum/mainnet/INITIALIZED ]; then + echo "datadir is already initialized" +else + echo "lemme download the database quickly" + rm -rf /root/.arbitrum/mainnet/db + curl https://snapshot.arbitrum.io/mainnet/db.tar | tar -xv -C /root/.arbitrum/mainnet/ && touch /root/.arbitrum/mainnet/INITIALIZED +fi + +echo "LFG!!!" /home/user/go/bin/arb-node $@