Skip to content

Instantly share code, notes, and snippets.

@Stoner19
Last active April 12, 2019 20:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Stoner19/dd97166096fe5e333dbbecdb7c6909f8 to your computer and use it in GitHub Desktop.
Save Stoner19/dd97166096fe5e333dbbecdb7c6909f8 to your computer and use it in GitHub Desktop.
simple bash script to install and/or update https://github.com/mochimodev/mochimo and start a NON-MINING node
#!/bin/bash
if [ -d $HOME/mochimo ];
then
echo "Mochimo directory already exists, checking for new commits and pulling the latest source";
cd $HOME/mochimo && git pull
echo "Starting gomochi in screen";
cd $HOME/mochimo/bin/ && screen -dmS mochimo ./gomochi d -n
else
echo "Installing dependencies and pulling latest Mochimo source";
echo "sudo password may be required";
sudo apt-get install build-essential pkg-config screen
cd ~
git clone https://github.com/mochimodev/mochimo
cd $HOME/mochimo/src && ./makeunx bin -DCPU && ./makeunx install
cd ../bin && cp maddr.mat maddr.dat
echo "Compile complete. Starting gomochi in screen";
screen -dmS mochimo ./gomochi d -n
fi
@Stoner19
Copy link
Author

Stoner19 commented Apr 12, 2019

** NOTE: This will create a maddr.dat file (which is needed to start a node) that you do NOT control the keys for. This is simply creating a node to validate transactions without mining.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment