Last active
April 26, 2016 00:55
-
-
Save sigwo/674f4b352af341d32d0aa69e2daedac9 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
#!/bin/bash | |
# ************************************************************************** | |
# Blitz installer | |
# Blitz-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 Blitz repo ***" | |
echo | |
git clone https://bitbucket.org/blitz-dev/blitz-public/src blitz | |
cd blitz/src/leveldb | |
chmod +x build_detect_platform | |
cd ..;cd .. | |
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 ~/.Blitz | |
rm -f Blitz.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" >> ~/.Blitz/Blitz.conf | |
echo | |
echo | |
# create desktop shortcut for Blitz | |
echo "*** Creating desktop icon ***" | |
echo | |
rm -f ~/.Blitz/blitz.png | |
rm -f ~/Desktop/BLITZ.desktop | |
wget https://i.imgur.com/FXlhf4s.png -O ~/.Blitz/blitz.png | |
echo "[Desktop Entry] | |
Name=Blitz | |
Type=Application | |
Comment=BLITZ | |
Categories=Application | |
Exec=/home/$USER/blitz/Blitz-qt | |
Icon=/home/$USER/.Blitz/blitz.png | |
Terminal=false | |
StartupNotify=true" >> ~/Desktop/BLITZ.desktop | |
chmod 755 ~/Desktop/BLITZ.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