diff --git a/build.sh b/build.sh index ecd2f1960f..84fc60040b 100755 --- a/build.sh +++ b/build.sh @@ -39,7 +39,8 @@ fi make -j2 -make install +# sudo make install +sudo cp eth/bcoseth /usr/local/bin/ cd .. cd ./tool diff --git a/sample/run.sh b/sample/run.sh index 4fb8b4ff56..4e510329a4 100755 --- a/sample/run.sh +++ b/sample/run.sh @@ -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 & \ No newline at end of file +sh /bcos-data/node1/start1.sh & diff --git a/sample/start.sh.template b/sample/start.sh.template index d2502ae306..d710a51546 100755 --- a/sample/start.sh.template +++ b/sample/start.sh.template @@ -1,3 +1,3 @@ #!/bin/sh -bcoseth --genesis {genesis} --config {config} +nohup bcoseth --genesis {genesis} --config {config} >> out.log 2>&1 &