-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdeploy.sh
executable file
·35 lines (30 loc) · 1.3 KB
/
deploy.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
pm2 delete all
rm -rf ~/.config/trustnote*
rm -rf ~/.config/witness*
rm -rf ~/.config/headless*
rm -rf ./witness*
rm -rf ./headless*
cp -r ./data/witness* ~/.config/
cp -r ./data/headless* ~/.config/
cp -r ./config-files/hub-conf.js ./trustnote-hub/conf.js
cp -r ./config-files/witness-conf.js ./trustnote-witness/conf.js
cp -r ./config-files/explorer-conf.js ./trustnote-explorer/conf.js
cp -r ./config-files/witness-headless-start.js ./trustnote-witness/node_modules/trustnote-headless/start.js
cp -r ./config-files/witness-start.js ./trustnote-witness/start.js
cp -r ./config-files/constants.js ./trustnote-witness/node_modules/trustnote-common/constants.js
cp -r ./config-files/constants.js ./trustnote-headless/node_modules/trustnote-common/constants.js
cp -r ./config-files/constants.js ./trustnote-hub/node_modules/trustnote-common/constants.js
cp -r ./config-files/constants.js ./trustnote-explorer/node_modules/trustnote-common/constants.js
for i in {1..12}
do
echo deploy witness$i
cp -r ./trustnote-witness/ ./witness$i
sed -i "s/trustnote-witness/witness$i/g" ./witness$i/package.json
done
for i in {13..15}
do
echo deploy headless$i
cp -r ./trustnote-headless/ ./headless$i
#sed -i "s/trustnote-headless/witness$i/g" ./witness$i/package.json
done
echo deploy finshed! run ./start.sh!