wget https://github.com/rebuschain/rebus.core/releases/download/$release/rebus_"$version"_Linux_x86_64.tar.gz chmod +x rebus_"$version"Linux_x86_64.tar.gz tar zxvf rebus"$version"Linux_x86_64.tar.gz rm rebus"$version"_Linux_x86_64.tar.gz rm -rf LICENSE systemctl stop rebusd mv $HOME/bin/rebusd $HOME/go/bin/rebusd rm -rf $HOME/bin systemctl start rebusd

rebusd config chain-id reb_1111-1
rebusd init "$NODE_MONIKER" --chain-id reb_1111-1

curl <https://raw.githubusercontent.com/rebuschain/rebus.mainnet/master/reb_1111-1/genesis.zip> > ~/.rebusd/config/genesis.zip
rm -rf ~/.rebusd/config/genesis.json
unzip ~/.rebusd/config/genesis.zip -d ~/.rebusd/config
SEEDS="[email protected]:26656"
PEERS=""
sed -i 's|^seeds *=.*|seeds = "'$SEEDS'"|; s|^persistent_peers *=.*|persistent_peers = "'$PEERS'"|' $HOME/.rebusd/config/config.toml

sed -i 's|^pruning *=.*|pruning = "custom"|g' $HOME/.rebusd/config/app.toml
sed -i 's|^pruning-keep-recent  *=.*|pruning-keep-recent = "100"|g' $HOME/.rebusd/config/app.toml
sed -i 's|^pruning-interval *=.*|pruning-interval = "10"|g' $HOME/.rebusd/config/app.toml
sed -i 's|^snapshot-interval *=.*|snapshot-interval = 0|g' $HOME/.rebusd/config/app.toml

sed -i 's|^minimum-gas-prices *=.*|minimum-gas-prices = "0.0001arebus"|g' $HOME/.rebusd/config/app.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.rebusd/config/config.toml
sudo tee /etc/systemd/system/rebusd.service > /dev/null << EOF
[Unit]
Description=Rebus Node
After=network-online.target
[Service]
User=$USER
ExecStart=$(which rebusd) start
Restart=on-failure
RestartSec=10
LimitNOFILE=10000
[Install]
WantedBy=multi-user.target
EOF

rebusd tendermint unsafe-reset-all --home $HOME/.rebusd --keep-addr-book

SNAP_NAME=$(curl -s <https://snapshots1.nodejumper.io/rebus/info.json> | jq -r .fileName)curl "<https://snapshots1.nodejumper.io/rebus/${SNAP_NAME}>" | lz4 -dc - | tar -xf - -C "$HOME/.rebusd"

sudo systemctl daemon-reload
sudo systemctl enable rebusd
sudo systemctl start rebusd

sudo journalctl -u rebusd -f --no-hostname -o cat