-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap.sh
More file actions
68 lines (66 loc) · 3.31 KB
/
bootstrap.sh
File metadata and controls
68 lines (66 loc) · 3.31 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
#!/bin/bash
#Setup Variables
GREEN='\033[0;32m'
NC='\033[0m'
echo -e ${YELLOW}"Welcome to the Northern Automated Bootstrap uodate."${NC}
echo "Please wait while updates are performed to bring your Master Node up to date..."
sleep 5
echo "Stopping first node, please wait...";
northern-cli -datadir=/home/northern/.northern stop
echo "Stopping second node, please wait...";
northern-cli -datadir=/home/northern2/.northern stop
echo "Stopping third node, please wait...";
northern-cli -datadir=/home/northern3/.northern stop
echo "cStopping fourth node, please wait...";
northern-cli -datadir=/home/northern4/.northern stop
sleep 10
echo "Removing binaries..."
cd /home/northern/.northern/blocks/
rm -r /home/northern/.northern/blocks/
mkdir /home/northern/.northern/blocks/
echo "Downloading Bootstrap file"
echo "Updating 1st Master Node Block files, please wait...";
wget -O bootstrap.dat https://drive.google.com/file/d/1vng25FoBP4sxzf3p43dRqf92dJuISZ5j/view?usp=sharing
sleep 5
echo "Downloading Bootstrap file"
echo "Updating 2nd Master Node Block files, please wait...";
rm -r /home/northern2/.northern/blocks/
mkdir /home/northern2/.northern/blocks/
cd /home/northern2/.northern/blocks/
wget -O bootstrap.dat https://drive.google.com/file/d/1vng25FoBP4sxzf3p43dRqf92dJuISZ5j/view?usp=sharing
sleep 5
echo "Downloading Bootstrap file"
echo "Updating 3rd Master Node Block files, please wait...";
rm -r /home/northern3/.northern/blocks/
mkdir /home/northern3/.northern/blocks/
cd /home/northern3/.northern/blocks/
wget -O bootstrap.dat https://drive.google.com/file/d/1vng25FoBP4sxzf3p43dRqf92dJuISZ5j/view?usp=sharing
sleep 5
echo "Downloading Bootstrap file"
echo "Updating last Master Node Block files, please wait...";
rm -r /home/northern4/.northern/blocks/
mkdir /home/northern4/.northern/blocks/
cd /home/northern4/.northern/blocks/
wget -O bootstrap.dat https://drive.google.com/file/d/1vng25FoBP4sxzf3p43dRqf92dJuISZ5j/view?usp=sharing
sleep 10
echo "Syncing first node, please wait...";
northernd -datadir=/home/northern/.northern -daemon -dbcache=1000
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. Your masternode is running!"${NC}
sleep 5
echo "Syncing second node, please wait...";
northernd -datadir=/home/northern2/.northern -daemon -dbcache=1000
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. Your masternode is running!"${NC}
sleep 5
echo "Syncing third node, please wait...";
northernd -datadir=/home/northern3/.northern -daemon -dbcache=1000
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. Your masternode is running!"${NC}
sleep 5
echo "Syncing fourth node, please wait...";
northernd -datadir=/home/northern4/.northern -daemon -dbcache=1000
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}"Fourth node is fully synced. Your masternode is running!"${NC}
sleep 5
echo "The END. You can close now the SSH terminal session";