How to edit / update Deez's update_znnd.sh script

Deez provided a script for pillars to update znnd.

These instructions will guide you through the process of editing the script for future releases and for your specific hardware architecture.

1. Check to see if you already have the script downloaded.

Change directory to /root and list the directory contents:

cd /root
ls

If you see update_znnd.sh continue with the Step 2 below. If you don’t already have the script:

Download the update script (if needed):

curl -o /root/update_znnd.sh https://gist.githubusercontent.com/0x3639/55adce44326c6acaa384bcabac8705ef/raw/31fd6e73b171d95252e2392e8c47869bcc53503f/update_znnd.sh

This downloads a file called update_znnd.sh to your pillar.

2. Open the script in the nano editor.

nano /root/update_znnd.sh



3. Visit the official zenon github, and right-click copy the link for the latest version that matches your architecture:

https://github.com/zenon-network/go-zenon/releases

4. Backspace the DOWNLOAD_URL in the script and paste the new url.

(Be certain that the url is "enclosed by quotation marks".



5. Open SHA256CHECKSUMS.txt for the latest release:

https://github.com/zenon-network/go-zenon/releases



6. Copy the checksum string from the left column, that matches with your architecture in the right column.

Example:



7. Backspace the EXPECTED_CHECKSUM in the script and paste the new checksum.

(Be certain that the checksum is "enclosed by quotation marks".



8. ctrl+X, save


9. Make the script executable:

chmod +x /root/update_znnd.sh

10. Stop the go-zenon service:

sudo systemctl stop go-zenon

11. Run the update script:

sudo /root/update_znnd.sh

The script will:

  • Download the new version of znnd.
  • Replace the old znnd with the new one.
  • Restart the service.

12. Wait for the script to finish.

It may take a minute or two. You’ll see messages in the Terminal as it works. When it’s done, you’ll return to the Terminal prompt.
2 Likes