Created
November 19, 2015 10:38
-
-
Save genecyber/a5de6853251cb4427ea9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl https://install.21.co/bitcoin-computer/install.sh | sudo bash | |
Congratulations, you just saved $365. That's all there is to it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
!/bin/bash
set -e
TWO1_PACKAGES=(zerotier-one)
TWO1_PACKAGES+=(bitcoind)
TWO1_PACKAGES+=(minerd)
TWO1_PACKAGES+=(two1)
Default to stable apt distribution if APT_DIST is not specified
if [ -z "$APT_DIST" ]; then
APT_URL="https://apt.21.co"
APT_DIST="stable"
fi
Add 21 apt repository
echo "deb $APT_URL $APT_DIST main" > /etc/apt/sources.list.d/twentyone.list
Back up this script to 21-recover
if [ ! -f /usr/bin/21-recover ]; then
sudo cp /usr/bin/21 /usr/bin/21-recover
fi
Install apt packages
apt-get update
DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt-get -y --force-yes install ${TWO1_PACKAGES[@]}
Update motd
sudo wget -L -q https://install.21.co/bitcoin-computer/motd -O /etc/motd