sudo systemctl stop fulcrum
LATEST_VERSION=$(wget -qO- https://api.github.com/repos/cculianu/Fulcrum/releases/latest | grep -oP '"tag_name": "v\K(.*)(?=")')
echo $LATEST_VERSION
cd /tmp
wget https://github.com/cculianu/Fulcrum/releases/download/v$LATEST_VERSION/Fulcrum-$LATEST_VERSION-x86_64-linux.tar.gz
wget https://github.com/cculianu/Fulcrum/releases/download/v$LATEST_VERSION/Fulcrum-$LATEST_VERSION-shasums.txt.asc
wget https://github.com/cculianu/Fulcrum/releases/download/v$LATEST_VERSION/Fulcrum-$LATEST_VERSION-shasums.txt
curl https://raw.githubusercontent.com/Electron-Cash/keys-n-hashes/master/pubkeys/calinkey.txt | gpg --import
gpg --verify Fulcrum-$LATEST_VERSION-shasums.txt.asc
sha256sum --check Fulcrum-$LATEST_VERSION-shasums.txt
tar -xvf Fulcrum-$LATEST_VERSION-x86_64-linux.tar.gz
sudo install -m 0755 -o root -g root -t /usr/local/bin Fulcrum-$LATEST_VERSION-x86_64-linux/Fulcrum Fulcrum-$LATEST_VERSION-x86_64-linux/FulcrumAdmin
sudo systemctl start fulcrum
rm fulcrum_upgrade.sh