Skip to content

Instantly share code, notes, and snippets.

@m1ari
Last active February 10, 2021 07:35
Show Gist options
  • Save m1ari/dd2902647c16e2a93449d2f7faa583f7 to your computer and use it in GitHub Desktop.
Save m1ari/dd2902647c16e2a93449d2f7faa583f7 to your computer and use it in GitHub Desktop.
EverGreenCoin - Manual Staker Image

Create User

sudo useradd -d /var/lib/evergreencoin -c 'EverGreenCoin Wallet Daemon' -r -s /usr/sbin/nologin evergreencoin`

Create Storage

sudo mkdir /var/lib/evergreencoin

Install Libraries and Tools

sudo apt install -y \
  libboost-system1.62.0 \
  libboost-filesystem1.62.0 \
  libboost-program-options1.62.0 \
  libboost-thread1.62.0 \
  libboost-chrono1.62.0 \
  libboost-date-time1.62.0 \
  libminiupnpc10 \
  jq

Download and Extract a snapshot

sudo unzip /tmp/Evergreencoin_blockchain_14.07.2018.zip 

Download and install the Software

sudo curl https://wiki.evergreencoin.org/files/raspbian/9/evergreencoind_1.7.3.1_armhf -o /usr/local/bin/evergreencoind
sudo chown root: /usr/local/bin/evergreencoind
sudo chmod 755 /usr/local/bin/evergreencoind

Add EverGreenCoin Wallet config file

sudo curl https://wiki.evergreencoin.org/images/f/f5/Evergreencoin.conf -o /var/lib/evergreencoin/evergreencoin.conf

Fix Permissions

sudo chown -R evergreencoin: /var/lib/evergreencoin

Create Pi User Config file

mkdir /home/pi/.evergreencoin
curl https://wiki.evergreencoin.org/images/a/af/User_Evergreencoin.conf -o /home/pi/.evergreencoin/evergreencoin.conf

Add EverGreenCoin Systemd service file

sudo curl https://wiki.evergreencoin.org/images/9/92/Evergreencoind.service -o /etc/systemd/system/evergreencoind.service
sudo systemctl enable evergreencoind.service

Generate a secure random password and update config files (replace NEWPASSWORD with the output of the openssl command)

openssl rand -base64 21
sudo sed -i -e '/^rpcpassword/ s/RPCPASSWD/NEWPASSWORD/' \
  /var/lib/evergreencoin/evergreencoin.conf \
  /home/pi/.evergreencoin/evergreencoin.conf

(Note Certain characters in the password may cause issues - particularly + and \ )

TODO: Log Rotation

Add version information to issue.txt (optional)

echo "EverGreenCoin Solar Staker $(/usr/local/bin/evergreencoind -? | head -1 | awk '{print $3}') $(date +%F)" | sudo tee -a /boot/issue.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment