Skip to content

Instantly share code, notes, and snippets.

@keo
Last active March 9, 2016 16:02
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 keo/aa66408437cf0b135951 to your computer and use it in GitHub Desktop.
Save keo/aa66408437cf0b135951 to your computer and use it in GitHub Desktop.
#!/bin/bash
## easiest way to run: curl -fsSL https://gist.githubusercontent.com/keo/aa66408437cf0b135951/raw/master/setup-bitcoin-classic-0.12-armhf.sh | bash
## Download the release tarball
wget -O bitcoin-0.12.0cl1-armhf.tar.gz https://github.com/bitcoinclassic/bitcoinclassic/releases/download/v0.12.0cl1/bitcoin-0.12.0cl1-armhf.tar.gz
## Check that the hash matches (hash taken from https://github.com/bitcoinclassic/bitcoinclassic/releases/download/v0.12.0cl1/SHA256SUMS.asc
echo 12dc7246142944e7367b681032dcdbe56d41a79cfd55e38778a4e7fb94b002ff bitcoin-0.12.0cl1-armhf.tar.gz | sha256sum -c || (echo "SHA256 failed, please retry download."; exit 1)
## Extract the binary from the release tarball
tar --strip-components=1 -xvf bitcoin-0.12.0cl1-armhf.tar.gz bitcoin-0.12.0cl1-armhf/bitcoin-0.12.0-armhf-cli.tar.gz
## Extract bitcoin files into /usr/local (*WARNING!* This will overwrite your existing bictoind, bitcoin-cli, bitcoin-tx, etc. files! If you need them, back them up)
sudo tar --strip-components=1 -C /usr/local/ -xvf bitcoin-0.12.0-armhf-cli.tar.gz
## now you have bitcoind, bitcoin-cli and bitcoin-tx on your path under /usr/local/bin
## Backup previous config
cd $HOME/.bitcoin
if [ -f bitcoin.conf ]; then mv bitcoin.conf bitcoin.conf.bak; fi
## Setup bitcoind (optimize for low memory usage)
wget https://gist.githubusercontent.com/keo/4e2de1624bce1862909c/raw/ed75afde6d2d4857f550bf4dcd63cff23c35ed89/bitcoin.conf
chmod 600 bitcoin.conf
## automatically start on boot
{ crontab -l ; echo ; } | sed '$a@reboot /usr/local/bin/bitcoind -daemon' | crontab
## Start Bitcoin Classic now
/usr/local/bin/bitcoind -daemon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment