Useful Scripts

Useful Scripts

This page will be updated with the most commonly used scripts to help simplify node maintenance

  • Upgrade Script

  • Tor Script

 

Description

Command

Description

Command

1

Upgrade Script

2

Download and install latest system and security updates

Update the packages

Remove old files

The following block of text is meant to be copied and pasted in its entirety

cat <<EOF > ~/upgrade.sh #!/bin/bash sudo apt-get update sudo apt-get -y dist-upgrade sudo apt-get -y autoremove sudo apt-get clean sudo apt-get autoclean EOF
chmod u+x ~/upgrade.sh
sudo ~/upgrade.sh
3

Tor Script - ONLY USE IF USING TOR

4

Update the torrc file to make tor work with the zend daemon

  • Some tor repo updates make changes to the torrc file, this script is intended to repair the tor service for zend

  • You will need to restart the zend client after running the script for changes to take affect, see System Maintenance for commands

The following block of text is meant to be copied and pasted in its entirety

cat <<EOF > ~/tor.sh #!/bin/bash sudo sed -i 's/#ControlPort 9051/ControlPort 9051/g' /etc/tor/torrc sudo sed -i 's/#CookieAuthentication 1/CookieAuthentication 1/g' /etc/tor/torrc sudo su -c "echo 'CookieAuthFileGroupReadable 1' >> /etc/tor/torrc" sudo su -c "echo 'LongLivedPorts 9033' >> /etc/tor/torrc" sudo systemctl restart tor.service EOF
chmod u+x ~/tor.sh
sudo ~/tor.sh