Skip to content

Instantly share code, notes, and snippets.

@sigwo
Last active April 26, 2016 22:46
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 sigwo/54c26f01eed1c71da12638e26df6968e to your computer and use it in GitHub Desktop.
Save sigwo/54c26f01eed1c71da12638e26df6968e to your computer and use it in GitHub Desktop.
#!/bin/bash
# **************************************************************************
# Bitcoindark installer
# Bitcoindark-qt + desktop icon
# Maintained by : sigwo
# **************************************************************************
# install dependencies
echo "*** Installing dependencies ***"
echo
sudo apt-get -y update
sudo apt-get -y upgrade
sudo apt-get install -y qt4-qmake libqt4-dev libminiupnpc-dev libdb++-dev libdb-dev libcrypto++-dev libqrencode-dev libboost-all-dev build-essential libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev libevent-dev libssl-dev ufw git
echo
echo "*** Cloning Bitcoindark repo ***"
echo
git clone https://github.com/laowais/bitcoindark.git btcd
cd btcd
qmake
make
echo
# create the firewall rules
echo
echo "*** Create firewall rules ***"
sudo ufw allow 9239
sudo ufw allow 22
sudo ufw enable
echo
# create config file and randomize the password
echo "*** Creating configuration file with randomized password ***"
echo
mkdir ~/.bitcoindark
rm -f bitcoindark.conf
echo "rpcuser=user
rpcpassword=$(cat /dev/urandom | tr -cd '[:alnum:]' | head -c32)
rpcallowip = 127.0.0.1
rpcport = 9239
server = 1
daemon = 1
listen = 1" >> ~/.bitcoindark/bitcoindark.conf
echo
echo
# create desktop shortcut for Bitcoindark
echo "*** Creating desktop icon ***"
echo
rm -f ~/.bitcoindark/btcd.jpg
rm -f ~/Desktop/BTCD.desktop
wget http://cryptomining-blog.com/wp-content/uploads/2014/07/bitcoindark-logo.jpg -O ~/.bitcoindark/btcd.jpg
echo "[Desktop Entry]
Name=Bitcoindark
Type=Application
Comment=BTCD
Categories=Application
Exec=/home/$USER/btcd/BitcoinDark-qt
Icon=/home/$USER/.bitcoindark/btcd.jpg
Terminal=false
StartupNotify=true" >> ~/Desktop/BTCD.desktop
chmod 755 ~/Desktop/BTCD.desktop
echo
echo "*** Installation finished - you can now run the wallet by double clicking the icon on the desktop ***"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment