Skip to content

Commit

Permalink
Merge pull request bcosorg#84 from JKingdom/master
Browse files Browse the repository at this point in the history
修改sample/run.sh 一键运行脚本
  • Loading branch information
cloudwindworld authored Dec 21, 2017
2 parents c3bfba5 + 4f4bd91 commit 4f07c28
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
3 changes: 2 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ fi

make -j2

make install
# sudo make install
sudo cp eth/bcoseth /usr/local/bin/

cd ..
cd ./tool
Expand Down
16 changes: 15 additions & 1 deletion sample/run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
#!/bin/sh

if [ -d "/bcos-data" ]; then
sudo rm -rf /bcos-data
fi

if [ `whoami` = "root" ];then
export PATH="${PATH}:/usr/local/bin"
else
user=`whoami`
group=`groups`
sudo mkdir /bcos-data
sudo chown ${user}:${group} /bcos-data
fi

node init.js node0.sample node1.sample
chmod +x /bcos-data/node0/start0.sh
chmod +x /bcos-data/node1/start1.sh
sh /bcos-data/node0/start0.sh &
sh /bcos-data/node1/start1.sh &
sh /bcos-data/node1/start1.sh &
2 changes: 1 addition & 1 deletion sample/start.sh.template
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh
bcoseth --genesis {genesis} --config {config}
nohup bcoseth --genesis {genesis} --config {config} >> out.log 2>&1 &

0 comments on commit 4f07c28

Please sign in to comment.