-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path2-deploy.sh
More file actions
36 lines (27 loc) · 1.2 KB
/
2-deploy.sh
File metadata and controls
36 lines (27 loc) · 1.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
#!/bin/sh
now=$(date +"%T")
#Download full blockchain from master node with max-ops 100 database running port 8090
cd /bitshares/
wget https://toronto.ca.api.bitshares.org/downloads/bts-full-node.tar.gz
if output=$(tar zxvf bts-full-node.tar.gz); then
printf 'TAR Extract done'
fi
rm -rf bts-full-node.tar.gz
echo "Downloaded and deployed successfully $now" | tee -a /bitshares/install
echo "##############################################"
echo "##############################################"
echo "##############################################"
#Download and unpack nginx conf and SSL for running bitshares on 2nd level *.bitshares.apasia.tech
cd /etc/nginx/
wget https://toronto.ca.api.bitshares.org/downloads/nginx.tar.gz | sed 's/\r//g'
tar zxvf nginx.tar.gz
rm -rf nginx.tar.gz
if output=$(nginx -c /etc/nginx/sites-available/bitshares -t > /bitshares/nginx-conf.test); then
printf 'BitShares conf test OK'
fi
nginx -s reload
echo "##############################################"
echo "##############################################"
echo "Nginx successfully running SSL & WebSocket at 8090"
echo "##############################################"
echo "##############################################"