2 | 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 Code Block |
---|
cat <<EOF > ~/tor_script.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 |
Code Block |
---|
chmod u+x ~/tor_script.sh |
Code Block |
---|
sudo ~/tor_script.sh |
| Backup Script | 3 | Replace <FQDN> with your fully-qualified domain name, remove '#' from '#7z a tor.7z ~/.zen/onion_private_key' if using tor More detail can be found here: Node Wallet Backup
| The following block of text is meant to be copied and pasted in its entirety
Code Block |
---|
cat <<EOF > ~/backup_script.sh
#!/bin/bash
#Create a temp Directory
mkdir ~/.temp
cd ~/.temp
#Archive Zend Files
7z a zen.conf.7z ~/.zen/zen.conf
7z a wallet.7z ~/.zen/wallet.dat
#7z a tor.7z ~/.zen/onion_private_key
#Archive Secure Node Tracker Config Files
7z a secnodetracker.7z ~/zencash/secnodetracker/config
#Archive Script Files
7z a scripts.7z ~/*.sh -xr!acme.sh
#Create Encrypted Archive of Backup Files
cd
7z a -p backup.$FQDN.7z ~/.temp
#Erase Temporary Files
rm -rf ~/.temp
cd
EOF |
Code Block |
---|
chmod u+x ~/backup_script.sh |
Code Block |
---|
~/backup_script.sh |
Restore Script | 4 | Replace <FQDN> with your fully qualified domain name, remove '#' from '#7z x tor.7z -ozen' and '#cp /home/$USER/.temp/zen/onion_private_key /home/$USER/.zen/' if using tor
More detail can be found here: Node Wallet Restore
UPDATE CODE BLOCK TO NODE, RATHER THAN SECNODE >>>
The following block of text is meant to be copied and pasted in its entirety
Code Block |
---|
cat <<EOF > ~/restore_script.sh
#!/bin/bash
#Create a temp Directory
mkdir ~/.temp
cd ~/.temp
#Extract Encrypted Archive of Backup Files
7z x backup.$FQDN.7z
#Extract Zend Files
7z x zen.conf.7z -ozen
7z x wallet.7z -ozen
#7z x tor.7z -ozen
#Extract Secure Node Tracker Config
7z x secnodetracker.7z -osecnodetracker
#Extract Script Files
7z x scripts.7z -oscripts
#Erase .7z Files
rm *.7z
#Make needed directories
mkdir /home/$USER/zencash/secnodetracker/config/
#Copy needed files
cp /home/$USER/.temp/secnodetracker/config/* /home/$USER/zencash/secnodetracker/config/
#cp /home/$USER/.temp/zen/onion_private_key /home/$USER/.zen/
cp /home/$USER/.temp/zen/wallet.dat /home/$USER/.zen/
cp /home/$USER/.temp/zen/zen.conf /home/$USER/.zen/
cp /home/$USER/.temp/scripts/*.sh /home/$USER/
#Erase Temporary Files
rm -rf ~/.temp
cd
EOF |
Code Block |
---|
chmod u+x ~/restore_script.sh |
Code Block |
---|
~/restore_script.sh |
|
---|