-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.SH
More file actions
407 lines (403 loc) · 24.2 KB
/
script.SH
File metadata and controls
407 lines (403 loc) · 24.2 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
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
#!/bin/bash
#Setup Variables
GREEN='\033[0;32m'
YELLOW='\033[0;93m'
RED='\033[0;31m'
NC='\033[0m'
#Checking OS
if [[ $(lsb_release -d) != *16.04* ]]; then
echo -e ${RED}"The operating system is not Ubuntu 16.04. You must be running on ubuntu 16.04."${NC}
exit 1
fi
echo -e ${YELLOW}"Welcome to the Northern Automated Install, During this Process Please Hit Enter or Input What is Asked."${NC}
echo
echo -e ${YELLOW}"You Will See alot of code flashing across your screen, don't be alarmed it's supposed to do that. This process can take up to an hour and may appear to be stuck, but I can promise you it's not."${NC}
echo
echo -e ${GREEN}"Are you sure you want to install a Northern Masternode? type y/n followed by [ENTER]:"${NC}
read AGREE
if [[ $AGREE =~ "y" ]] ; then
echo -e ${GREEN}"Please Enter Your Masternodes Private Key for the 1st node:"${NC}
read privkey
echo -e ${GREEN}"Please Enter Your Masternodes Private Key for 2nd node:"${NC}
read privkey2
echo -e ${GREEN}"Please Enter Your Masternodes Private Key for 3rd node:"${NC}
read privkey3
echo -e ${GREEN}"Please Enter Your Masternodes Private Key for 4th node:"${NC}
read privkey4
echo -e ${GREEN}"Please Enter Your Masternodes Private Key for 5th node:"${NC}
read privkey5
echo -e ${GREEN}"Please Enter Your Masternodes Private Key for 6th node:"${NC}
read privkey6
echo -e ${GREEN}"Please Enter Your Masternodes Private Key for 7th node:"${NC}
read privkey7
echo -e ${GREEN}"Please Enter Your Masternodes Private Key for 8th node:"${NC}
read privkey8
echo -e ${GREEN}"Please Enter Your Masternodes Private Key for 9th node:"${NC}
read privkey9
echo -e ${GREEN}"Please Enter Your Masternodes Private Key for 10th node:"${NC}
read privkey10
echo "Creating 10 Northern system users with no-login access:"
sudo adduser --system --home /home/northern northern
sudo adduser --system --home /home/northern2 northern2
sudo adduser --system --home /home/northern3 northern3
sudo adduser --system --home /home/northern4 northern4
sudo adduser --system --home /home/northern5 northern5
sudo adduser --system --home /home/northern6 northern6
sudo adduser --system --home /home/northern7 northern7
sudo adduser --system --home /home/northern8 northern8
sudo adduser --system --home /home/northern9 northern9
sudo adduser --system --home /home/northern10 northern10
sudo apt-get -y update
sudo apt-get -y upgrade
sudo apt-get -y install software-properties-common
sudo apt-get -y install build-essential
sudo apt-get -y install libtool autotools-dev autoconf automake
sudo apt-get -y install libssl-dev
sudo apt-get -y install libevent-dev
sudo apt-get -y install libboost-all-dev
sudo apt-get -y install pkg-config
sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get -y install libdb4.8-dev
sudo apt-get -y install libdb4.8++-dev
sudo apt-get -y install libminiupnpc-dev libzmq3-dev libevent-pthreads-2.0-5
sudo apt-get -y install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev
sudo apt-get -y install libqrencode-dev bsdmainutils unzip
#sudo apt install git
cd /var
sudo touch swap.img
sudo chmod 600 swap.img
sudo dd if=/dev/zero of=/var/swap.img bs=1024k count=2000
sudo mkswap /var/swap.img
sudo swapon /var/swap.img
sudo echo ' /var/swap.img none swap sw 0 0 ' >> /etc/fstab
cd ~
sudo mkdir /root/nort
cd /root/nort
wget https://github.com/zabtc/Northern/releases/download/1.0.0/northern-1.0.0-x86_64-linux-gnu.tar.gz
tar -xzvf northern-1.0.0-x86_64-linux-gnu.tar.gz
sudo mv /root/nort/northernd /root/nort/northern-cli /root/nort/northern-tx /usr/local/bin
sudo chmod 755 -R /usr/local/bin/northern*
sudo mkdir /home/northern/.northern
sudo touch /home/northern/.northern/northern.conf
echo -e "${GREEN}Configuring Wallet for first node${NC}"
echo "rpcuser=user"`shuf -i 100000-10000000 -n 1` >> /home/northern/.northern/northern.conf
echo "rpcpassword=pass"`shuf -i 100000-10000000 -n 1` >> /home/northern/.northern/northern.conf
echo "rpcallowip=127.0.0.1" >> /home/northern/.northern/northern.conf
echo "server=1" >> /home/northern/.northern/northern.conf
echo "daemon=1" >> /home/northern/.northern/northern.conf
echo "maxconnections=250" >> /home/northern/.northern/northern.conf
echo "masternode=1" >> /home/northern/.northern/northern.conf
echo "rpcport=6943" >> /home/northern/.northern/northern.conf
echo "listen=0" >> /home/northern/.northern/northern.conf
echo "externalip=$(hostname -I | cut -f1 -d' '):6942" >> /home/northern/.northern/northern.conf
echo "masternodeprivkey=$privkey" >> /home/northern/.northern/northern.conf
echo "addnode=209.250.233.104" >> /home/northern/.northern/northern.conf
echo "addnode=45.77.82.101" >> /home/northern/.northern/northern.conf
echo "addnode=138.68.167.127" >> /home/northern/.northern/northern.conf
echo "addnode=207.246.86.118" >> /home/northern/.northern/northern.conf
echo "addnode=149.56.4.247" >> /home/northern/.northern/northern.conf
echo "addnode=149.56.4.246" >> /home/northern/.northern/northern.conf
echo "addnode=149.56.4.245" >> /home/northern/.northern/northern.conf
echo "addnode=149.56.4.244" >> /home/northern/.northern/northern.conf
echo "addnode=149.56.4.243" >> /home/northern/.northern/northern.conf
echo "addnode=149.56.4.242" >> /home/northern/.northern/northern.conf
echo "addnode=149.56.4.241" >> /home/northern/.northern/northern.conf
sleep 5
echo -e "${GREEN}Configuring Wallet for second node${NC}"
sudo mkdir /home/northern2/.northern
sudo touch /home/northern2/.northern/northern.conf
echo "rpcuser=user"`shuf -i 100000-10000000 -n 1` >> /home/northern2/.northern/northern.conf
echo "rpcpassword=pass"`shuf -i 100000-10000000 -n 1` >> /home/northern2/.northern/northern.conf
echo "rpcallowip=127.0.0.1" >> /home/northern2/.northern/northern.conf
echo "server=1" >> /home/northern2/.northern/northern.conf
echo "daemon=1" >> /home/northern2/.northern/northern.conf
echo "maxconnections=250" >> /home/northern2/.northern/northern.conf
echo "masternode=1" >> /home/northern2/.northern/northern.conf
echo "rpcport=6944" >> /home/northern2/.northern/northern.conf
echo "listen=0" >> /home/northern2/.northern/northern.conf
echo "externalip=$(hostname -I | cut -f1 -d' '):6942" >> /home/northern2/.northern/northern.conf
echo "masternodeprivkey=$privkey2" >> /home/northern2/.northern/northern.conf
echo "addnode=209.250.233.104" >> /home/northern2/.northern/northern.conf
echo "addnode=45.77.82.101" >> /home/northern2/.northern/northern.conf
echo "addnode=138.68.167.127" >> /home/northern2/.northern/northern.conf
echo "addnode=207.246.86.118" >> /home/northern2/.northern/northern.conf
echo "addnode=149.56.4.247" >> /home/northern2/.northern/northern.conf
echo "addnode=149.56.4.246" >> /home/northern2/.northern/northern.conf
echo "addnode=149.56.4.245" >> /home/northern2/.northern/northern.conf
echo "addnode=149.56.4.244" >> /home/northern2/.northern/northern.conf
echo "addnode=149.56.4.243" >> /home/northern2/.northern/northern.conf
echo "addnode=149.56.4.242" >> /home/northern2/.northern/northern.conf
echo "addnode=149.56.4.241" >> /home/northern2/.northern/northern.conf
sleep 5
echo -e "${GREEN}Configuring Wallet for third node${NC}"
sudo mkdir /home/northern3/.northern
sudo touch /home/northern3/.northern/northern.conf
echo "rpcuser=user"`shuf -i 100000-10000000 -n 1` >> /home/northern3/.northern/northern.conf
echo "rpcpassword=pass"`shuf -i 100000-10000000 -n 1` >> /home/northern3/.northern/northern.conf
echo "rpcallowip=127.0.0.1" >> /home/northern3/.northern/northern.conf
echo "server=1" >> /home/northern3/.northern/northern.conf
echo "daemon=1" >> /home/northern3/.northern/northern.conf
echo "maxconnections=250" >> /home/northern3/.northern/northern.conf
echo "masternode=1" >> /home/northern3/.northern/northern.conf
echo "rpcport=6945" >> /home/northern3/.northern/northern.conf
echo "listen=0" >> /home/northern3/.northern/northern.conf
echo "externalip=$(hostname -I | cut -f1 -d' '):6942" >> /home/northern3/.northern/northern.conf
echo "masternodeprivkey=$privkey3" >> /home/northern3/.northern/northern.conf
echo "addnode=209.250.233.104" >> /home/northern3/.northern/northern.conf
echo "addnode=45.77.82.101" >> /home/northern3/.northern/northern.conf
echo "addnode=138.68.167.127" >> /home/northern3/.northern/northern.conf
echo "addnode=207.246.86.118" >> /home/northern3/.northern/northern.conf
echo "addnode=149.56.4.247" >> /home/northern3/.northern/northern.conf
echo "addnode=149.56.4.246" >> /home/northern3/.northern/northern.conf
echo "addnode=149.56.4.245" >> /home/northern3/.northern/northern.conf
echo "addnode=149.56.4.244" >> /home/northern3/.northern/northern.conf
echo "addnode=149.56.4.243" >> /home/northern3/.northern/northern.conf
echo "addnode=149.56.4.242" >> /home/northern3/.northern/northern.conf
echo "addnode=149.56.4.241" >> /home/northern3/.northern/northern.conf
sleep 5
echo -e "${GREEN}Configuring Wallet for 4th node${NC}"
sudo mkdir /home/northern4/.northern
sudo touch /home/northern4/.northern/northern.conf
echo "rpcuser=user"`shuf -i 100000-10000000 -n 1` >> /home/northern4/.northern/northern.conf
echo "rpcpassword=pass"`shuf -i 100000-10000000 -n 1` >> /home/northern4/.northern/northern.conf
echo "rpcallowip=127.0.0.1" >> /home/northern4/.northern/northern.conf
echo "server=1" >> /home/northern4/.northern/northern.conf
echo "daemon=1" >> /home/northern4/.northern/northern.conf
echo "maxconnections=250" >> /home/northern4/.northern/northern.conf
echo "masternode=1" >> /home/northern4/.northern/northern.conf
echo "rpcport=6946" >> /home/northern4/.northern/northern.conf
echo "listen=0" >> /home/northern4/.northern/northern.conf
echo "externalip=$(hostname -I | cut -f1 -d' '):6942" >> /home/northern4/.northern/northern.conf
echo "masternodeprivkey=$privkey4" >> /home/northern4/.northern/northern.conf
echo "addnode=209.250.233.104" >> /home/northern4/.northern/northern.conf
echo "addnode=45.77.82.101" >> /home/northern4/.northern/northern.conf
echo "addnode=138.68.167.127" >> /home/northern4/.northern/northern.conf
echo "addnode=207.246.86.118" >> /home/northern4/.northern/northern.conf
echo "addnode=149.56.4.247" >> /home/northern4/.northern/northern.conf
echo "addnode=149.56.4.246" >> /home/northern4/.northern/northern.conf
echo "addnode=149.56.4.245" >> /home/northern4/.northern/northern.conf
echo "addnode=149.56.4.244" >> /home/northern4/.northern/northern.conf
echo "addnode=149.56.4.243" >> /home/northern4/.northern/northern.conf
echo "addnode=149.56.4.242" >> /home/northern4/.northern/northern.conf
echo "addnode=149.56.4.241" >> /home/northern4/.northern/northern.conf
sleep 5
echo -e "${GREEN}Configuring Wallet for 5th node${NC}"
sudo mkdir /home/northern5/.northern
sudo touch /home/northern5/.northern/northern.conf
echo "rpcuser=user"`shuf -i 100000-10000000 -n 1` >> /home/northern5/.northern/northern.conf
echo "rpcpassword=pass"`shuf -i 100000-10000000 -n 1` >> /home/northern5/.northern/northern.conf
echo "rpcallowip=127.0.0.1" >> /home/northern5/.northern/northern.conf
echo "server=1" >> /home/northern5/.northern/northern.conf
echo "daemon=1" >> /home/northern5/.northern/northern.conf
echo "maxconnections=250" >> /home/northern5/.northern/northern.conf
echo "masternode=1" >> /home/northern5/.northern/northern.conf
echo "rpcport=6944" >> /home/northern5/.northern/northern.conf
echo "listen=0" >> /home/northern5/.northern/northern.conf
echo "externalip=$(hostname -I | cut -f1 -d' '):6942" >> /home/northern5/.northern/northern.conf
echo "masternodeprivkey=$privkey5" >> /home/northern5/.northern/northern.conf
echo "addnode=209.250.233.104" >> /home/northern5/.northern/northern.conf
echo "addnode=45.77.82.101" >> /home/northern5/.northern/northern.conf
echo "addnode=138.68.167.127" >> /home/northern5/.northern/northern.conf
echo "addnode=207.246.86.118" >> /home/northern5/.northern/northern.conf
echo "addnode=149.56.4.247" >> /home/northern5/.northern/northern.conf
echo "addnode=149.56.4.246" >> /home/northern5/.northern/northern.conf
echo "addnode=149.56.4.245" >> /home/northern5/.northern/northern.conf
echo "addnode=149.56.4.244" >> /home/northern5/.northern/northern.conf
echo "addnode=149.56.4.243" >> /home/northern5/.northern/northern.conf
echo "addnode=149.56.4.242" >> /home/northern5/.northern/northern.conf
echo "addnode=149.56.4.241" >> /home/northern5/.northern/northern.conf
sleep 5
echo -e "${GREEN}Configuring Wallet for 6th node${NC}"
sudo mkdir /home/northern6/.northern
sudo touch /home/northern6/.northern/northern.conf
echo "rpcuser=user"`shuf -i 100000-10000000 -n 1` >> /home/northern6/.northern/northern.conf
echo "rpcpassword=pass"`shuf -i 100000-10000000 -n 1` >> /home/northern6/.northern/northern.conf
echo "rpcallowip=127.0.0.1" >> /home/northern6/.northern/northern.conf
echo "server=1" >> /home/northern6/.northern/northern.conf
echo "daemon=1" >> /home/northern6/.northern/northern.conf
echo "maxconnections=250" >> /home/northern6/.northern/northern.conf
echo "masternode=1" >> /home/northern6/.northern/northern.conf
echo "rpcport=6945" >> /home/northern6/.northern/northern.conf
echo "listen=0" >> /home/northern6/.northern/northern.conf
echo "externalip=$(hostname -I | cut -f1 -d' '):6942" >> /home/northern6/.northern/northern.conf
echo "masternodeprivkey=$privkey6" >> /home/northern6/.northern/northern.conf
echo "addnode=209.250.233.104" >> /home/northern6/.northern/northern.conf
echo "addnode=45.77.82.101" >> /home/northern6/.northern/northern.conf
echo "addnode=138.68.167.127" >> /home/northern6/.northern/northern.conf
echo "addnode=207.246.86.118" >> /home/northern6/.northern/northern.conf
echo "addnode=149.56.4.247" >> /home/northern6/.northern/northern.conf
echo "addnode=149.56.4.246" >> /home/northern6/.northern/northern.conf
echo "addnode=149.56.4.245" >> /home/northern6/.northern/northern.conf
echo "addnode=149.56.4.244" >> /home/northern6/.northern/northern.conf
echo "addnode=149.56.4.243" >> /home/northern6/.northern/northern.conf
echo "addnode=149.56.4.242" >> /home/northern6/.northern/northern.conf
echo "addnode=149.56.4.241" >> /home/northern6/.northern/northern.conf
sleep 5
echo -e "${GREEN}Configuring Wallet for the 7th node${NC}"
sudo mkdir /home/northern7/.northern
sudo touch /home/northern7/.northern/northern.conf
echo "rpcuser=user"`shuf -i 100000-10000000 -n 1` >> /home/northern7/.northern/northern.conf
echo "rpcpassword=pass"`shuf -i 100000-10000000 -n 1` >> /home/northern7/.northern/northern.conf
echo "rpcallowip=127.0.0.1" >> /home/northern7/.northern/northern.conf
echo "server=1" >> /home/northern7/.northern/northern.conf
echo "daemon=1" >> /home/northern7/.northern/northern.conf
echo "maxconnections=250" >> /home/northern7/.northern/northern.conf
echo "masternode=1" >> /home/northern7/.northern/northern.conf
echo "rpcport=6944" >> /home/northern7/.northern/northern.conf
echo "listen=0" >> /home/northern7/.northern/northern.conf
echo "externalip=$(hostname -I | cut -f1 -d' '):6942" >> /home/northern7/.northern/northern.conf
echo "masternodeprivkey=$privkey7" >> /home/northern7/.northern/northern.conf
echo "addnode=209.250.233.104" >> /home/northern7/.northern/northern.conf
echo "addnode=45.77.82.101" >> /home/northern7/.northern/northern.conf
echo "addnode=138.68.167.127" >> /home/northern7/.northern/northern.conf
echo "addnode=207.246.86.118" >> /home/northern7/.northern/northern.conf
echo "addnode=149.56.4.247" >> /home/northern7/.northern/northern.conf
echo "addnode=149.56.4.246" >> /home/northern7/.northern/northern.conf
echo "addnode=149.56.4.245" >> /home/northern7/.northern/northern.conf
echo "addnode=149.56.4.244" >> /home/northern7/.northern/northern.conf
echo "addnode=149.56.4.243" >> /home/northern7/.northern/northern.conf
echo "addnode=149.56.4.242" >> /home/northern7/.northern/northern.conf
echo "addnode=149.56.4.241" >> /home/northern7/.northern/northern.conf
sleep 5
echo -e "${GREEN}Configuring Wallet for the 8th node${NC}"
sudo mkdir /home/northern8/.northern
sudo touch /home/northern8/.northern/northern.conf
echo "rpcuser=user"`shuf -i 100000-10000000 -n 1` >> /home/northern8/.northern/northern.conf
echo "rpcpassword=pass"`shuf -i 100000-10000000 -n 1` >> /home/northern8/.northern/northern.conf
echo "rpcallowip=127.0.0.1" >> /home/northern8/.northern/northern.conf
echo "server=1" >> /home/northern8/.northern/northern.conf
echo "daemon=1" >> /home/northern8/.northern/northern.conf
echo "maxconnections=250" >> /home/northern8/.northern/northern.conf
echo "masternode=1" >> /home/northern8/.northern/northern.conf
echo "rpcport=6945" >> /home/northern8/.northern/northern.conf
echo "listen=0" >> /home/northern8/.northern/northern.conf
echo "externalip=$(hostname -I | cut -f1 -d' '):6942" >> /home/northern8/.northern/northern.conf
echo "masternodeprivkey=$privkey8 >> /home/northern8/.northern/northern.conf
echo "addnode=209.250.233.104" >> /home/northern8/.northern/northern.conf
echo "addnode=45.77.82.101" >> /home/northern8/.northern/northern.conf
echo "addnode=138.68.167.127" >> /home/northern/8.northern/northern.conf
echo "addnode=207.246.86.118" >> /home/northern8/.northern/northern.conf
echo "addnode=149.56.4.247" >> /home/northern8/.northern/northern.conf
echo "addnode=149.56.4.246" >> /home/northern8/.northern/northern.conf
echo "addnode=149.56.4.245" >> /home/northern8/.northern/northern.conf
echo "addnode=149.56.4.244" >> /home/northern8/.northern/northern.conf
echo "addnode=149.56.4.243" >> /home/northern8/.northern/northern.conf
echo "addnode=149.56.4.242" >> /home/northern8/.northern/northern.conf
echo "addnode=149.56.4.241" >> /home/northern8/.northern/northern.conf
sleep 5
echo -e "${GREEN}Configuring Wallet for the 9th node${NC}"
sudo mkdir /home/northern9/.northern
sudo touch /home/northern9/.northern/northern.conf
echo "rpcuser=user"`shuf -i 100000-10000000 -n 1` >> /home/northern9/.northern/northern.conf
echo "rpcpassword=pass"`shuf -i 100000-10000000 -n 1` >> /home/northern9/.northern/northern.conf
echo "rpcallowip=127.0.0.1" >> /home/northern9/.northern/northern.conf
echo "server=1" >> /home/northern9/.northern/northern.conf
echo "daemon=1" >> /home/northern9/.northern/northern.conf
echo "maxconnections=250" >> /home/northern9/.northern/northern.conf
echo "masternode=1" >> /home/northern9/.northern/northern.conf
echo "rpcport=6944" >> /home/northern9/.northern/northern.conf
echo "listen=0" >> /home/northern9/.northern/northern.conf
echo "externalip=$(hostname -I | cut -f1 -d' '):6942" >> /home/northern9/.northern/northern.conf
echo "masternodeprivkey=$privkey9" >> /home/northern9/.northern/northern.conf
echo "addnode=209.250.233.104" >> /home/northern9/.northern/northern.conf
echo "addnode=45.77.82.101" >> /home/northern9/.northern/northern.conf
echo "addnode=138.68.167.127" >> /home/northern9/.northern/northern.conf
echo "addnode=207.246.86.118" >> /home/northern9/.northern/northern.conf
echo "addnode=149.56.4.247" >> /home/northern9/.northern/northern.conf
echo "addnode=149.56.4.246" >> /home/northern9/.northern/northern.conf
echo "addnode=149.56.4.245" >> /home/northern9/.northern/northern.conf
echo "addnode=149.56.4.244" >> /home/northern9/.northern/northern.conf
echo "addnode=149.56.4.243" >> /home/northern9/.northern/northern.conf
echo "addnode=149.56.4.242" >> /home/northern9/.northern/northern.conf
echo "addnode=149.56.4.241" >> /home/northern9/.northern/northern.conf
sleep 5
echo -e "${GREEN}Configuring Wallet for the 10th node${NC}"
sudo mkdir /home/northern10/.northern
sudo touch /home/northern10/.northern/northern.conf
echo "rpcuser=user"`shuf -i 100000-10000000 -n 1` >> /home/northern10/.northern/northern.conf
echo "rpcpassword=pass"`shuf -i 100000-10000000 -n 1` >> /home/northern10/.northern/northern.conf
echo "rpcallowip=127.0.0.1" >> /home/northern10/.northern/northern.conf
echo "server=1" >> /home/northern10/.northern/northern.conf
echo "daemon=1" >> /home/northern10/.northern/northern.conf
echo "maxconnections=250" >> /home/northern10/.northern/northern.conf
echo "masternode=1" >> /home/northern10/.northern/northern.conf
echo "rpcport=6945" >> /home/northern10/.northern/northern.conf
echo "listen=0" >> /home/northern10/.northern/northern.conf
echo "externalip=$(hostname -I | cut -f1 -d' '):6942" >> /home/northern10/.northern/northern.conf
echo "masternodeprivkey=$privkey10" >> /home/northern10/.northern/northern.conf
echo "addnode=209.250.233.104" >> /home/northern10/.northern/northern.conf
echo "addnode=45.77.82.101" >> /home/northern10/.northern/northern.conf
echo "addnode=138.68.167.127" >> /home/northern10/.northern/northern.conf
echo "addnode=207.246.86.118" >> /home/northern10/.northern/northern.conf
echo "addnode=149.56.4.247" >> /home/northern10/.northern/northern.conf
echo "addnode=149.56.4.246" >> /home/northern10/.northern/northern.conf
echo "addnode=149.56.4.245" >> /home/northern10/.northern/northern.conf
echo "addnode=149.56.4.244" >> /home/northern10/.northern/northern.conf
echo "addnode=149.56.4.243" >> /home/northern10/.northern/northern.conf
echo "addnode=149.56.4.242" >> /home/northern10/.northern/northern.conf
echo "addnode=149.56.4.241" >> /home/northern10/.northern/northern.conf
sleep 5
fi
echo "Syncing first node, please wait...";
northernd -datadir=/home/northern/.northern -daemon
sleep 10
until northern-cli -datadir=/home/northern/.northern mnsync status | grep -m 1 '"IsBlockchainSynced": true,'; do sleep 1 ; done > /dev/null 2>&1
echo -e ${GREEN}"First node is fully synced. You 1st masternode is running!"${NC}
sleep 10
echo "Syncing second node, please wait...";
northernd -datadir=/home/northern2/.northern -daemon
sleep 10
until northern-cli -datadir=/home/northern2/.northern mnsync status | grep -m 1 '"IsBlockchainSynced": true,'; do sleep 1 ; done > /dev/null 2>&1
echo -e ${GREEN}"Second node is fully synced. You second masternode is running!"${NC}
sleep 10
echo "Syncing third node, please wait...";
northernd -datadir=/home/northern3/.northern -daemon
sleep 10
until northern-cli -datadir=/home/northern3/.northern mnsync status | grep -m 1 '"IsBlockchainSynced": true,'; do sleep 1 ; done > /dev/null 2>&1
echo -e ${GREEN}"Third node is fully synced. You third masternode is running!"${NC}
sleep 10
echo "Syncing 4th node, please wait...";
northernd -datadir=/home/northern2/.northern -daemon
sleep 10
until northern-cli -datadir=/home/northern4/.northern mnsync status | grep -m 1 '"IsBlockchainSynced": true,'; do sleep 1 ; done > /dev/null 2>&1
echo -e ${GREEN}"4th node is fully synced. You 4th masternode is running!"${NC}
sleep 10
echo "Syncing 5th node, please wait...";
northernd -datadir=/home/northern5/.northern -daemon
sleep 10
until northern-cli -datadir=/home/northern5/.northern mnsync status | grep -m 1 '"IsBlockchainSynced": true,'; do sleep 1 ; done > /dev/null 2>&1
echo -e ${GREEN}"5th node is fully synced. You 5th masternode is running!"${NC}
sleep 10
echo "Syncing 6th node, please wait...";
northernd -datadir=/home/northern6/.northern -daemon
sleep 10
until northern-cli -datadir=/home/northern6/.northern mnsync status | grep -m 1 '"IsBlockchainSynced": true,'; do sleep 1 ; done > /dev/null 2>&1
echo -e ${GREEN}"6th node is fully synced. You 6th masternode is running!"${NC}
sleep 10
echo "Syncing 7th node, please wait...";
northernd -datadir=/home/northern7/.northern -daemon
sleep 10
until northern-cli -datadir=/home/northern7/.northern mnsync status | grep -m 1 '"IsBlockchainSynced": true,'; do sleep 1 ; done > /dev/null 2>&1
echo -e ${GREEN}"7th node is fully synced. You 7th masternode is running!"${NC}
sleep 10
echo "Syncing 8th node, please wait...";
northernd -datadir=/home/northern8/.northern -daemon
sleep 10
until northern-cli -datadir=/home/northern8/.northern mnsync status | grep -m 1 '"IsBlockchainSynced": true,'; do sleep 1 ; done > /dev/null 2>&1
echo -e ${GREEN}"8th node is fully synced. You 8th masternode is running!"${NC}
sleep 10
echo "Syncing 9th node, please wait...";
northernd -datadir=/home/northern9/.northern -daemon
sleep 10
until northern-cli -datadir=/home/northern9/.northern mnsync status | grep -m 1 '"IsBlockchainSynced": true,'; do sleep 1 ; done > /dev/null 2>&1
echo -e ${GREEN}"9th node is fully synced. You 9th masternode is running!"${NC}
sleep 10
echo "Syncing 10th node, please wait...";
northernd -datadir=/home/northern10/.northern -daemon
sleep 10
until northern-cli -datadir=/home/northern10/.northern mnsync status | grep -m 1 '"IsBlockchainSynced": true,'; do sleep 1 ; done > /dev/null 2>&1
echo -e ${GREEN}"Last node is fully synced. You 10th masternode is running!"${NC}
echo ""
echo -e ${GREEN}"Congrats! Your NORT Masternodes are now installed and started. Please wait from 10-20 minutes in order to give the masternode enough time to sync, then start the node from your wallet, Debug console option"${NC}
echo "The END. You can close now the SSH terminal session";