Twister Installer script for Debian based hosts.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
1.7 KiB

10 years ago
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
#
# Created by twitter.com/Kurobeats
# Install
DIRECTORY=".twister"
8 years ago
ip_address="127.0.0.1"
10 years ago
echo -e "Please setup the username and password.\n"
echo -e "Username: "
read user
echo -e "\nPassword: "
8 years ago
read passwd
10 years ago
if [ ! -d ~/${DIRECTORY} ]; then
echo -e "\nCreating $DIRECTORY directory\n"
mkdir ~/${DIRECTORY}
fi
cd ~/${DIRECTORY}
echo -e "Installing needed packages\n"
8 years ago
sudo apt update && sudo apt -y install git autoconf libtool build-essential libboost-all-dev libssl-dev libdb++-dev libminiupnpc-dev automake
10 years ago
echo -e "Downloading required packages\n"
git clone https://github.com/miguelfreitas/twister-core.git
cd ./twister-core
./autotool.sh
8 years ago
./configure
10 years ago
make
# Configuration & web gui
8 years ago
echo -e "rpcuser=${user}\nrpcpassword=${passwd}" > ~/.twister/twister.conf
10 years ago
chmod 600 ~/.twister/twister.conf
git clone https://github.com/miguelfreitas/twister-html.git ~/.twister/html
# Start
8 years ago
./twisterd -rpcuser=${user} -rpcpassword=${passwd} -rpcallowip=${ip_address} &
disown
8 years ago
echo -e "Service started at http://localhost:28332/index.html"
10 years ago
exit