forked from globalcointeam/Insurance
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinsurance-script.sh
More file actions
75 lines (63 loc) · 2.73 KB
/
Copy pathinsurance-script.sh
File metadata and controls
75 lines (63 loc) · 2.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#/bin/bash
cd ~
echo "****************************************************************************"
echo "* Ubuntu 16.04 is the recommended opearting system for this install. *"
echo "* *"
echo "* This script will install and configure your Insurance Wallet. *"
echo "****************************************************************************"
echo && echo && echo
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo "! !"
echo "! Make sure you double check before hitting enter !"
echo "! !"
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo && echo && echo
echo "Do you want to install all needed dependencies (no if you did it before)? [y/n]"
read DOSETUP
if [[ $DOSETUP =~ "y" ]] ; then
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y dist-upgrade
sudo apt-get install -y nano htop git
sudo apt-get install -y software-properties-common
sudo apt-get install -y build-essential libtool autotools-dev pkg-config libssl-dev
sudo apt-get install -y libboost-all-dev
sudo apt-get install -y libevent-dev
sudo apt-get install -y libminiupnpc-dev
sudo apt-get install -y autoconf
sudo apt-get install -y automake unzip
sudo add-apt-repository -y ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install -y libdb4.8-dev libdb4.8++-dev
fi
## COMPILE AND INSTALL
wget https://github.com/globalcointeam/Insurance/releases/download/V1.1/ubuntu-1604.zip
unzip ubuntu-1604.zip
sudo chmod 755 insurance*
sudo mv insurance* /usr/bin
CONF_DIR=~/.insurance/
mkdir $CONF_DIR
CONF_FILE=insurance.conf
IP=`ifconfig | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p'`
echo ""
echo "Enter masternode private key for node $ALIAS"
read PRIVKEY
echo "Enter masternode port for node $ALIAS or use defauth port 22150"
read PORT
echo "rpcuser=user"`shuf -i 100000-10000000 -n 1` >> $CONF_DIR/$CONF_FILE
echo "rpcpassword=pass"`shuf -i 100000-10000000 -n 1` >> $CONF_DIR/$CONF_FILE
echo "rpcallowip=127.0.0.1" >> $CONF_DIR/$CONF_FILE
echo "listen=1" >> $CONF_DIR/$CONF_FILE
echo "server=1" >> $CONF_DIR/$CONF_FILE
echo "daemon=1" >> $CONF_DIR/$CONF_FILE
echo "logtimestamps=1" >> $CONF_DIR/$CONF_FILE
echo "maxconnections=256" >> $CONF_DIR/$CONF_FILE
echo "masternode=1" >> $CONF_DIR/$CONF_FILE
echo "" >> $CONF_DIR/$CONF_FILE
echo "" >> $CONF_DIR/$CONF_FILE
echo "masternodeaddr=$IP:$PORT" >> $CONF_DIR/$CONF_FILE
echo "masternodeprivkey=$PRIVKEY" >> $CONF_DIR/$CONF_FILE
echo "Folder to edit the file insurance.conf - .insurance"
echo "Use insuranced to start wallet"
echo "Use insurance-cli stop to stop wallet"
insuranced