forked from BitcoinPurple/BTCP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bitcoinpurple-auto.sh
60 lines (41 loc) · 1.31 KB
/
bitcoinpurple-auto.sh
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
#!/bin/bash
sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get install libxcb-xinerama0 -y
cd $HOME
wget "https://dl.walletbuilders.com/download?customer=892645b852d705d7b4dfc41a08a06c8d02c80b8a4553f8e495&filename=bitcoinpurple-qt-linux.tar.gz" -O bitcoinpurple-qt-linux.tar.gz
mkdir $HOME/Desktop/BitcoinPurple
tar -xzvf bitcoinpurple-qt-linux.tar.gz --directory $HOME/Desktop/BitcoinPurple
mkdir $HOME/.bitcoinpurple
cat << EOF > $HOME/.bitcoinpurple/bitcoinpurple.conf
rpcuser=rpc_bitcoinpurple
rpcpassword=dR2oBQ3K1zYMZQtJFZeAerhWxaJ5Lqeq9J2
rpcbind=127.0.0.1
rpcallowip=127.0.0.1
listen=1
server=1
addnode=node3.walletbuilders.com
EOF
cat << EOF > $HOME/Desktop/BitcoinPurple/start_wallet.sh
#!/bin/bash
SCRIPT_PATH=\`pwd\`;
cd \$SCRIPT_PATH
./bitcoinpurple-qt
EOF
chmod +x $HOME/Desktop/BitcoinPurple/start_wallet.sh
cat << EOF > $HOME/Desktop/BitcoinPurple/mine.sh
#!/bin/bash
SCRIPT_PATH=\`pwd\`;
cd \$SCRIPT_PATH
while :
do
./bitcoinpurple-cli generatetoaddress 1 \$(./bitcoinpurple-cli getnewaddress)
done
EOF
chmod +x $HOME/Desktop/BitcoinPurple/mine.sh
exec $HOME/Desktop/BitcoinPurple/bitcoinpurple-qt &
sleep 15
exec $HOME/Desktop/BitcoinPurple/bitcoinpurple-cli -named createwallet wallet_name="" &
sleep 15
cd $HOME/Desktop/BitcoinPurple/
clear
exec $HOME/Desktop/BitcoinPurple/mine.sh