Skip to content

Instantly share code, notes, and snippets.

@Stoner19 Stoner19/mochi.sh
Last active Apr 12, 2019

Embed
What would you like to do?
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

This comment has been minimized.

Copy link
Owner Author

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
You can’t perform that action at this time.