Skip to content

Instantly share code, notes, and snippets.

@Errorist79
Created May 4, 2022 05:25
Show Gist options
  • Save Errorist79/bcabdaaaa9065cfde203258ae3e1033b to your computer and use it in GitHub Desktop.
Save Errorist79/bcabdaaaa9065cfde203258ae3e1033b to your computer and use it in GitHub Desktop.
systemctl stop kyved
wget https://github.com/KYVENetwork/chain/releases/download/v0.0.1/cosmovisor_linux_amd64
mv cosmovisor_linux_amd64 cosmovisor
chmod +x cosmovisor
cp cosmovisor /usr/bin
mkdir -p ~/.kyve/cosmovisor/genesis/bin/
echo "{}" > ~/.kyve/cosmovisor/genesis/upgrade-info.json
cp /usr/bin/kyved ~/.kyve/cosmovisor/genesis/bin/
echo 'export DAEMON_HOME="$HOME/.kyve"' >> $HOME/.profile
echo 'export DAEMON_NAME="kyved"' >> $HOME/.profile
echo 'export DAEMON_ALLOW_DOWNLOAD_BINARIES="true"' >> $HOME/.profile
echo 'export DAEMON_RESTART_AFTER_UPGRADE="true"' >> $HOME/.profile
echo 'export UNSAFE_SKIP_BACKUP="true"' >> $HOME/.profile
source ~/.profile
systemctl disable kyved
rm /etc/systemd/system/kyved.service
sudo tee /etc/systemd/system/kyved.service > /dev/null <<EOF
[Unit]
Description=Kyve Daemon
After=network-online.target
[Service]
User=$USER
ExecStart=$(which cosmovisor) start
Restart=always
RestartSec=3
LimitNOFILE=infinity
Environment="DAEMON_HOME=$HOME/.kyve"
Environment="DAEMON_NAME=kyved"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=true"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
Environment="UNSAFE_SKIP_BACKUP=true"
[Install]
WantedBy=multi-user.target
EOF
sudo -S systemctl daemon-reload
sudo -S systemctl enable kyved
sudo -S systemctl start kyved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment