-
Notifications
You must be signed in to change notification settings - Fork 2
/
deploy.sh
28 lines (24 loc) · 1.13 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
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
echo deploy finshed! run ./start.sh!