forked from bulwark-crypto/Bulwark-MN-Install
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
552 lines (452 loc) · 18 KB
/
install.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
#!/bin/bash
# Make installer interactive and select normal mode by default.
INTERACTIVE="y"
ADVANCED="n"
POSITIONAL=()
while [[ $# -gt 0 ]]
do
key="$1"
case $key in
-a|--advanced)
ADVANCED="y"
shift
;;
-n|--normal)
ADVANCED="n"
FAIL2BAN="y"
UFW="y"
BOOTSTRAP="y"
shift
;;
-i|--externalip)
EXTERNALIP="$2"
ARGUMENTIP="y"
shift
shift
;;
--bindip)
BINDIP="$2"
shift
shift
;;
-k|--privatekey)
KEY="$2"
shift
shift
;;
-f|--fail2ban)
FAIL2BAN="y"
shift
;;
--no-fail2ban)
FAIL2BAN="n"
shift
;;
-u|--ufw)
UFW="y"
shift
;;
--no-ufw)
UFW="n"
shift
;;
-b|--bootstrap)
BOOTSTRAP="y"
shift
;;
--no-bootstrap)
BOOTSTRAP="n"
shift
;;
--no-interaction)
INTERACTIVE="n"
shift
;;
--tor)
TOR="y"
shift
;;
-h|--help)
cat << EOL
Bulwark Masternode installer arguments:
-n --normal : Run installer in normal mode
-a --advanced : Run installer in advanced mode
-i --externalip <address> : Public IP address of VPS
--bindip <address> : Internal bind IP to use
-k --privatekey <key> : Private key to use
-f --fail2ban : Install Fail2Ban
--no-fail2ban : Don't install Fail2Ban
-u --ufw : Install UFW
--no-ufw : Don't install UFW
-b --bootstrap : Sync node using Bootstrap
--no-bootstrap : Don't use Bootstrap
-h --help : Display this help text.
--no-interaction : Do not wait for wallet activation.
--tor : Install TOR and configure bulwarkd to use it
EOL
exit
;;
*) # unknown option
POSITIONAL+=("$1") # save it in an array for later
shift
;;
esac
done
set -- "${POSITIONAL[@]}" # restore positional parameters
clear
# Set these to change the version of Bulwark to install
TARBALLURL=`curl -s https://api.github.com/repos/bulwark-crypto/bulwark/releases/latest | grep browser_download_url | grep linux64 | cut -d '"' -f 4`
TARBALLNAME=`curl -s https://api.github.com/repos/bulwark-crypto/bulwark/releases/latest | grep browser_download_url | grep linux64 | cut -d '"' -f 4 | cut -d "/" -f 9`
BWKVERSION=`curl -s https://api.github.com/repos/bulwark-crypto/bulwark/releases/latest | grep browser_download_url | grep ARMx64 | cut -d '"' -f 4 | cut -d "/" -f 8`
BOOTSTRAPURL=`curl -s https://api.github.com/repos/bulwark-crypto/bulwark/releases/latest | grep bootstrap.dat.xz | grep browser_download_url | cut -d '"' -f 4`
BOOTSTRAPARCHIVE="bootstrap.dat.xz"
#!/bin/bash
# Check if we are root
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root." 1>&2
exit 1
fi
# Check if we have enough memory
if [[ `free -m | awk '/^Mem:/{print $2}'` -lt 850 ]]; then
echo "This installation requires at least 1GB of RAM.";
exit 1
fi
# Check if we have enough disk space
if [[ `df -k --output=avail / | tail -n1` -lt 10485760 ]]; then
echo "This installation requires at least 10GB of free disk space.";
exit 1
fi
# Install tools for dig and systemctl
echo "Preparing installation..."
apt-get install git dnsutils systemd -y > /dev/null 2>&1
# Check for systemd
systemctl --version >/dev/null 2>&1 || { echo "systemd is required. Are you using Ubuntu 16.04?" >&2; exit 1; }
# Get our current IP
if [ -z "$EXTERNALIP" ]; then
EXTERNALIP=`dig +short myip.opendns.com @resolver1.opendns.com`
fi
clear
if [[ $INTERACTIVE = "y" ]]; then
echo "
___T_
| o o |
|__-__|
/| []|\\
()/|___|\()
|_|_|
/_|_\ ------- MASTERNODE INSTALLER v3 -------+
| |
| Welcome to the Bulwark Masternode Installer! |::
| |::
+------------------------------------------------+::
::::::::::::::::::::::::::::::::::::::::::::::::::
"
sleep 3
fi
if [[ ("$ADVANCED" == "y" || "$ADVANCED" == "Y") ]]; then
USER=bulwark
adduser $USER --gecos "First Last,RoomNumber,WorkPhone,HomePhone" --disabled-password > /dev/null
INSTALLERUSED="#Used Advanced Install"
echo "" && echo 'Added user "bulwark"' && echo ""
sleep 1
else
USER=root
if [ -z "$FAIL2BAN" ]; then
FAIL2BAN="y"
fi
if [ -z "$UFW" ]; then
UFW="y"
fi
if [ -z "$BOOTSTRAP" ]; then
BOOTSTRAP="y"
fi
INSTALLERUSED="#Used Basic Install"
fi
USERHOME=`eval echo "~$USER"`
if [ -z "$ARGUMENTIP" ]; then
read -e -p "Server IP Address: " -i $EXTERNALIP -e EXTERNALIP
fi
if [ -z "$BINDIP" ]; then
BINDIP=$EXTERNALIP;
fi
if [ -z "$KEY" ]; then
read -e -p "Masternode Private Key (e.g. 7edfjLCUzGczZi3JQw8GHp434R9kNY33eFyMGeKRymkB56G4324h # THE KEY YOU GENERATED EARLIER) : " KEY
fi
if [ -z "$FAIL2BAN" ]; then
read -e -p "Install Fail2ban? [Y/n] : " FAIL2BAN
fi
if [ -z "$UFW" ]; then
read -e -p "Install UFW and configure ports? [Y/n] : " UFW
fi
if [ -z "$BOOTSTRAP" ]; then
read -e -p "Do you want to use our bootstrap file to speed the syncing process? [Y/n] : " BOOTSTRAP
fi
if [ -z "$TOR" ]; then
read -e -p "Would you like to use bulwarkd via TOR? [y/N] : " TOR
fi
clear
# Generate random passwords
RPCUSER=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 12 | head -n 1)
RPCPASSWORD=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# update packages and upgrade Ubuntu
echo "Installing dependencies..."
apt-get -qq update
apt-get -qq upgrade
apt-get -qq autoremove
apt-get -qq install wget htop xz-utils
apt-get -qq install build-essential && apt-get -qq install libtool autotools-dev autoconf automake && apt-get -qq install libssl-dev && apt-get -qq install libboost-all-dev && apt-get -qq install software-properties-common && add-apt-repository -y ppa:bitcoin/bitcoin && apt update && apt-get -qq install libdb4.8-dev && apt-get -qq install libdb4.8++-dev && apt-get -qq install libminiupnpc-dev && apt-get -qq install libqt4-dev libprotobuf-dev protobuf-compiler && apt-get -qq install libqrencode-dev && apt-get -qq install git && apt-get -qq install pkg-config && apt-get -qq install libzmq3-dev
apt-get -qq install aptitude
# Install Fail2Ban
if [[ ("$FAIL2BAN" == "y" || "$FAIL2BAN" == "Y" || "$FAIL2BAN" == "") ]]; then
aptitude -y -q install fail2ban
# Reduce Fail2Ban memory usage - http://hacksnsnacks.com/snippets/reduce-fail2ban-memory-usage/
echo "ulimit -s 256" | sudo tee -a /etc/default/fail2ban
service fail2ban restart
fi
# Install UFW
if [[ ("$UFW" == "y" || "$UFW" == "Y" || "$UFW" == "") ]]; then
apt-get -qq install ufw
ufw default deny incoming
ufw default allow outgoing
ufw allow ssh
ufw allow 52543/tcp
yes | ufw enable
fi
# Install TOR
if [[ ("$TOR" == "y" || "$TOR" == "Y") ]]; then
echo "Installing TOR..."
apt-get -qq install tor
cat >> /etc/tor/torrc << EOL
### BULWARK CONFIGURATION ###
HiddenServiceDir /var/lib/tor/hidden_service/
ClientOnly 1
ControlPort 9051
NumEntryGuards 4
NumDirectoryGuards 3
GuardLifetime 2764800
GeoIPExcludeUnknown 1
EntryNodes 31.185.104.19/32,31.185.104.20/31,46.182.106.190/32,51.15.13.245/32,51.15.43.232/32,51.15.44.197/32,51.15.45.97/32,51.15.46.49/32,51.15.50.133/32,51.15.57.177/32,51.15.57.79/32,51.15.60.255/32,51.15.60.62/32,62.102.148.67/32,62.138.7.171/32,77.109.139.87/32,78.142.140.242/32,80.67.172.162/32,81.7.10.29/32,82.94.251.227/32,85.248.227.163/32,85.248.227.164/31,86.59.119.83/32,86.59.119.88/32,89.234.157.254/32,91.121.23.100/32,94.140.120.44/32,94.242.246.23/32,94.242.246.24/32,94.252.114.48/32,95.142.161.63/32,134.119.3.164/32,171.25.193.20/32,171.25.193.25/32,171.25.193.77/32,171.25.193.78/32,176.10.104.240/32,176.10.104.243/32,176.126.252.11/32,176.126.252.12/32,178.16.208.55/32,178.16.208.56/30,178.16.208.60/31,178.16.208.62/32,178.20.55.16/32,178.20.55.18/32,178.209.42.84/32,185.100.84.82/32,185.100.86.100/32,185.34.33.2/32,185.86.149.75/32,188.118.198.244/32,192.36.27.4/32,192.36.27.6/31,192.42.116.16/32,212.51.156.78/32
ExitNodes 31.185.104.19/32,31.185.104.20/31,46.182.106.190/32,51.15.43.232/32,51.15.44.197/32,51.15.45.97/32,51.15.46.49/32,51.15.50.133/32,51.15.57.177/32,51.15.57.79/32,51.15.60.255/32,51.15.60.62/32,62.102.148.67/32,77.109.139.87/32,80.67.172.162/32,85.248.227.163/32,85.248.227.164/31,89.234.157.254/32,94.242.246.23/32,94.242.246.24/32,95.142.161.63/32,171.25.193.20/32,171.25.193.25/32,171.25.193.77/32,171.25.193.78/32,176.10.104.240/32,176.10.104.243/32,176.126.252.11/32,176.126.252.12/32,178.20.55.16/32,178.20.55.18/32,178.209.42.84/32,185.100.84.82/32,185.100.86.100/32,185.34.33.2/32,192.36.27.4/32,192.36.27.6/31,192.42.116.16/32,212.16.104.33/32
ExcludeNodes default,Unnamed,{ae},{af},{ag},{ao},{az},{ba},{bb},{bd},{bh},{bi},{bn},{bt},{bw},{by},{cd},{cf},{cg},{ci},{ck},{cm},{cn},{cu},{cy},{dj},{dm},{dz},{eg},{er},{et},{fj},{ga},{gd},{gh},{gm},{gn},{gq},{gy},{hr},{ht},{id},{in},{iq},{ir},{jm},{jo},{ke},{kg},{kh},{ki},{km},{kn},{kp},{kw},{kz},{la},{lb},{lc},{lk},{lr},{ly},{ma},{me},{mk},{ml},{mm},{mr},{mu},{mv},{mw},{my},{na},{ng},{om},{pg},{ph},{pk},{ps},{qa},{rs},{ru},{rw},{sa},{sb},{sd},{sg},{si},{sl},{sn},{so},{st},{sy},{sz},{td},{tg},{th},{tj},{tm},{tn},{to},{tr},{tt},{tv},{tz},{ug},{uz},{vc},{ve},{vn},{ws},{ye},{zm},{zw},{??}
ExcludeExitNodes default,Unnamed,{ae},{af},{ag},{ao},{az},{ba},{bb},{bd},{bh},{bi},{bn},{bt},{bw},{by},{cd},{cf},{cg},{ci},{ck},{cm},{cn},{cu},{cy},{dj},{dm},{dz},{eg},{er},{et},{fj},{ga},{gd},{gh},{gm},{gn},{gq},{gy},{hr},{ht},{id},{in},{iq},{ir},{jm},{jo},{ke},{kg},{kh},{ki},{km},{kn},{kp},{kw},{kz},{la},{lb},{lc},{lk},{lr},{ly},{ma},{me},{mk},{ml},{mm},{mr},{mu},{mv},{mw},{my},{na},{ng},{om},{pg},{ph},{pk},{ps},{qa},{rs},{ru},{rw},{sa},{sb},{sd},{sg},{si},{sl},{sn},{so},{st},{sy},{sz},{td},{tg},{th},{tj},{tm},{tn},{to},{tr},{tt},{tv},{tz},{ug},{uz},{vc},{ve},{vn},{ws},{ye},{zm},{zw},{??}
HiddenServiceDir /var/lib/tor/hidden_service/
HiddenServicePort 52543 127.0.0.1:52543
HiddenServicePort 80 127.0.0.1:80
LongLivedPorts 80,52543
EOL
/etc/init.d/tor stop
sudo rm -R /var/lib/tor/hidden_service 2>/dev/null
/etc/init.d/tor start
echo "Starting TOR, please wait..."
sleep 5 # Give tor enough time to connect before we continue
fi
# Install Bulwark daemon
wget $TARBALLURL
tar -xzvf $TARBALLNAME && mv bin bulwark-$BWKVERSION
rm $TARBALLNAME
cp ./bulwark-$BWKVERSION/bulwarkd /usr/local/bin
cp ./bulwark-$BWKVERSION/bulwark-cli /usr/local/bin
cp ./bulwark-$BWKVERSION/bulwark-tx /usr/local/bin
rm -rf bulwark-$BWKVERSION
# Create .bulwark directory
mkdir $USERHOME/.bulwark
# Install bootstrap file
if [[ ("$BOOTSTRAP" == "y" || "$BOOTSTRAP" == "Y" || "$BOOTSTRAP" == "") ]]; then
echo "Installing bootstrap file..."
wget $BOOTSTRAPURL && xz -cd $BOOTSTRAPARCHIVE > $USERHOME/.bulwark/bootstrap.dat && rm $BOOTSTRAPARCHIVE
fi
# Create bulwark.conf
touch $USERHOME/.bulwark/bulwark.conf
# Set TORHOSTNAME if it exists.
if [[ -f /var/lib/tor/hidden_service/hostname ]]; then
TORHOSTNAME=`cat /var/lib/tor/hidden_service/hostname`
fi
# We need a different conf for TOR support
if [[ ("$TOR" == "y" || "$TOR" == "Y") ]]; then
cat > $USERHOME/.bulwark/bulwark.conf << EOL
rpcuser=${RPCUSER}
rpcpassword=${RPCPASSWORD}
rpcallowip=127.0.0.1
listen=1
server=1
daemon=1
logtimestamps=1
maxconnections=256
onion=127.0.0.1:9050
onlynet=tor
bind=127.0.0.1
dnsseed=0
masternodeprivkey=${KEY}
masternode=1
externalip=${TORHOSTNAME}
EOL
else
cat > $USERHOME/.bulwark/bulwark.conf << EOL
${INSTALLERUSED}
rpcuser=${RPCUSER}
rpcpassword=${RPCPASSWORD}
rpcallowip=127.0.0.1
listen=1
server=1
daemon=1
logtimestamps=1
maxconnections=256
externalip=${EXTERNALIP}
bind=${BINDIP}:52543
masternodeaddr=${EXTERNALIP}
masternodeprivkey=${KEY}
masternode=1
EOL
fi
chmod 0600 $USERHOME/.bulwark/bulwark.conf
chown -R $USER:$USER $USERHOME/.bulwark
sleep 1
cat > /etc/systemd/system/bulwarkd.service << EOL
[Unit]
Description=Bulwarks's distributed currency daemon
After=network.target
[Service]
Type=forking
User=${USER}
WorkingDirectory=${USERHOME}
ExecStart=/usr/local/bin/bulwarkd -conf=${USERHOME}/.bulwark/bulwark.conf -datadir=${USERHOME}/.bulwark
ExecStop=/usr/local/bin/bulwark-cli -conf=${USERHOME}/.bulwark/bulwark.conf -datadir=${USERHOME}/.bulwark stop
Restart=on-failure
RestartSec=1m
StartLimitIntervalSec=5m
StartLimitInterval=5m
StartLimitBurst=3
[Install]
WantedBy=multi-user.target
EOL
systemctl enable bulwarkd
echo "Starting bulwarkd..."
systemctl start bulwarkd
sleep 10
if ! systemctl status bulwarkd | grep -q "active (running)"; then
echo "ERROR: Failed to start bulwarkd. Please contact support."
exit
fi
echo "Waiting for wallet to load..."
until bulwark-cli getinfo 2>/dev/null | grep -q "version"; do
sleep 1;
done
clear
echo "Your masternode is syncing. Please wait for this process to finish."
echo "This can take up to a few hours. Do not close this window."
if [[ ("$TOR" == "y" || "$TOR" == "Y") ]]; then
echo "The TOR address of your masternode is: $TORHOSTNAME"
fi
echo ""
until su -c "bulwark-cli mnsync status 2>/dev/null | grep '\"IsBlockchainSynced\" : true' > /dev/null" $USER; do
echo -ne "Current block: "`su -c "bulwark-cli getinfo" $USER | grep blocks | awk '{print $3}' | cut -d ',' -f 1`'\r'
sleep 1
done
clear
cat << EOL
Now, you need to start your masternode. Please go to your desktop wallet and
enter the following line into your debug console:
startmasternode alias false <mymnalias>
where <mymnalias> is the name of your masternode alias (without brackets)
EOL
if [[ $INTERACTIVE = "y" ]]; then
read -p "Press Enter to continue after you've done that. " -n1 -s
fi
clear
sleep 1
su -c "/usr/local/bin/bulwark-cli startmasternode local false" $USER
sleep 1
clear
su -c "/usr/local/bin/bulwark-cli masternode status" $USER
sleep 5
read -e -p "Would you now like to set up staking from this VPS? [N/y] : " STAKING
if [[ ("$STAKING" == "y" || "$STAKING" == "Y") ]]; then
#Ensure bulwarkd is active
if systemctl is-active --quiet bulwarkd; then
systemctl start bulwarkd
fi
echo "Setting Up Staking Address.."
#Simple check to make sure the bulwarkd sync process is finished, so it isn't interrupted and forced to start over later.'
echo "Checking Bulwarkd status. The script will begin setting up staking once bulwarkd has finished syncing. Please allow this process to finish."
until su -c "bulwark-cli mnsync status 2>/dev/null | grep '\"IsBlockchainSynced\" : true' > /dev/null" $USER; do
echo -ne "Current block: "`su -c "bulwark-cli getinfo" $USER | grep blocks | awk '{print $3}' | cut -d ',' -f 1`'\r'
sleep 1
done
#Ensure the .conf exists
touch ~/.bulwark/bulwark.conf
#If the line does not already exist, adds a line to bulwark.conf to instruct the wallet to stake
sed 's/staking=0/staking=1/' <~/.bulwark/bulwark.conf
if grep -Fxq "staking=1" ~/.bulwark/bulwark.conf; then
echo "Staking Already Active"
else
echo "staking=1" >> ~/.bulwark/bulwark.conf
fi
#Generates new address and assigns it a variable
STAKINGADDRESS=$(bulwark-cli getnewaddress)
#Ask for a password and apply it to a variable and confirm it.
ENCRYPTIONKEY=1
ENCRYPTIONKEYCONF=2
until [ $ENCRYPTIONKEY = $ENCRYPTIONKEYCONF ]; do
read -e -s -p "Please enter a password to encrypt your new staking address/wallet with, you will not see what you type appear. (KEEP THIS SAFE, THIS CANNOT BE RECOVERED) : " ENCRYPTIONKEY
read -e -s -p "Please confirm your password : " ENCRYPTIONKEYCONF
if [ $ENCRYPTIONKEY != $ENCRYPTIONKEYCONF ]; then
echo "Your passwords do not match, please try again."
else
echo "Password set."
fi
done
#Encrypt the new address with the requested password
BIP38=$(bulwark-cli bip38encrypt $STAKINGADDRESS $ENCRYPTIONKEY)
echo "Address successfully encrypted!"
#Encrypt the wallet with the same password
bulwark-cli encryptwallet $ENCRYPTIONKEY && echo "Wallet successfully encrypted!" || { echo "Encryption failed!"; exit; }
#Wait for bulwarkd to close down after wallet encryption
echo "Waiting for bulwarkd to restart..."
until ! systemctl is-active --quiet bulwarkd; do
sleep 0.5
done
#Open up bulwarkd again
systemctl start bulwarkd
#Unlocks the wallet for a long time period
bulwark-cli walletpassphrase $ENCRYPTIONKEY 9999999999 true
#Make decrypt script
cd ~/.bulwark
sudo wget https://raw.githubusercontent.com/KaneoHunter/shn/master/decrypt.sh
cp ~/.bulwark/decrypt.sh /usr/bin/local/bin/decrypt.sh
chown $USER:$USER /usr/local/bin/decrypt.sh
chmod 700 /usr/local/bin/decrypt.sh
rm -Rf ~/.bulwark/decrypt.sh
#Output more
cat << EOL
Your wallet has now been set up for staking, please send the coins you wish to
stake to ${STAKINGADDRESS}. Once your wallet is synced your coins should begin
staking automatically.
To check on the status of your staked coins you can run
"bulwark-cli getstakingstatus" and "bulwark-cli getinfo".
You can import the private key for this address in to your QT wallet using
the BIP38 tool under settings, just enter the information below with the
password you chose at the start. We recommend you take note of the following
lines to assist with recovery if ever needed.
${BIP38}
If your bulwarkd restarts, and you need to unlock your wallet again, use
the included script by running "decrypt.sh" to unlock your
wallet securely.
After the installation script ends, we will wipe all history and have no
storage record of your password, encrypted key, or addresses.
Any funds you lose access to are your own responsibility and the Bulwark team
will be unable to assist with their recovery. We therefore suggesting saving a
physical copy of this information.
If you have any concerns, we encourage you to contact us via any of our
social media channels.
EOL
read -e -p "Please confirm you have written down your password and encrypted key somewhere
safe by typing \"I have read the above and agree\" : " CONFIRMATION
until [ "$CONFIRMATION" = "I have read the above and agree" ]; do
if [ "$CONFIRMATION" != "I have read the above and agree" ]; then
read -e -p "Please confirm you have written down your password and encrypted key somewhere
safe by typing \"I have read the above and agree\" : " CONFIRMATION
echo "Thank you for installing your Bulwark masternode, now finishing installation.."
unset CONFIRMATION ENCRYPTIONKEYCONF ENCRYPTIONKEY BIP38 STAKINGADDRESS
cat /dev/null > ~/.bash_history && history -c
clear
echo "Masternode operational."