From 8ff22774507a6d5e9cabb21ffe22554864b8f88b Mon Sep 17 00:00:00 2001 From: 0g-wh Date: Thu, 25 Jul 2024 15:05:53 +0800 Subject: [PATCH] add cosmovisor init script --- networks/testnet/init-cosmovisor.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 networks/testnet/init-cosmovisor.sh diff --git a/networks/testnet/init-cosmovisor.sh b/networks/testnet/init-cosmovisor.sh new file mode 100644 index 00000000..8ac85491 --- /dev/null +++ b/networks/testnet/init-cosmovisor.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +if [ -z "$1" ]; then + echo "Usage: $0 <0G Home>" + exit 1 +fi + +go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@latest + +export DAEMON_NAME=0gchaind +echo "export DAEMON_NAME=0gchaind" >> ~/.profile +export DAEMON_HOME=$1 +echo "export DAEMON_HOME=$1" >> ~/.profile +cosmovisor init $(whereis -b 0gchaind | awk '{print $2}') +mkdir $DAEMON_HOME/cosmovisor/backup +echo "export DAEMON_DATA_BACKUP_DIR=$DAEMON_HOME/cosmovisor/backup" >> ~/.profile +echo "export DAEMON_ALLOW_DOWNLOAD_BINARIES=true" >> ~/.profile