|
@@ -1,25 +1,33 @@
|
|
|
|
+[ -e /root/bityuan ] && echo "bityuan exist. please rename or backup bityuan first. package will install to bityuan" && exit 0
|
|
[ ! -e /root/chain33 ] && curl -sSLf https://dev.33.cn/linj/installChain33/raw/master/install_and_dumpkey.sh | sh && exit 0
|
|
[ ! -e /root/chain33 ] && curl -sSLf https://dev.33.cn/linj/installChain33/raw/master/install_and_dumpkey.sh | sh && exit 0
|
|
|
|
+supervisorctl stop chain33
|
|
|
|
+
|
|
|
|
+[ -e /etc/supervisor/conf.d/chain33.conf ] && rm /etc/supervisor/conf.d/chain33.conf
|
|
|
|
+[ -e /root/chain33 ] && mv /root/chain33 /root/bityuan
|
|
|
|
+
|
|
cd /tmp/
|
|
cd /tmp/
|
|
[ -e /tmp/chain33 ] && rm /tmp/chain33 -rf
|
|
[ -e /tmp/chain33 ] && rm /tmp/chain33 -rf
|
|
|
|
+[ -e /tmp/bityuan ] && rm /tmp/bityuan -rf
|
|
[ -e /tmp/bityuan_ubuntu.tgz ] && rm /tmp/bityuan_ubuntu.tgz
|
|
[ -e /tmp/bityuan_ubuntu.tgz ] && rm /tmp/bityuan_ubuntu.tgz
|
|
cd /tmp/
|
|
cd /tmp/
|
|
wget https://bityuan.com/download/bityuan_ubuntu.tgz
|
|
wget https://bityuan.com/download/bityuan_ubuntu.tgz
|
|
tar zxf bityuan_ubuntu.tgz
|
|
tar zxf bityuan_ubuntu.tgz
|
|
-cd chain33
|
|
|
|
-[ -e chain33 ] && install chain33 /root/chain33/chain33
|
|
|
|
-[ -e bityuan ] && install bityuan /root/chain33/bityuan
|
|
|
|
-[ -e chain33-cli ] && install chain33-cli /root/chain33/chain33-cli
|
|
|
|
-[ -e chain33.toml ] && install chain33.toml /root/chain33/chain33.toml
|
|
|
|
-[ -e bityuan.toml ] && install bityuan.toml /root/chain33/bityuan.toml
|
|
|
|
-[ -e bityuan.lite.toml ] && install bityuan.lite.toml /root/chain33/bityuan.lite.toml
|
|
|
|
-[ -e chain33.conf ] && install chain33.conf /etc/supervisor/conf.d/chain33.conf && supervisorctl reload
|
|
|
|
|
|
+cd bityuan
|
|
|
|
+
|
|
|
|
+[ -e bityuan ] && install bityuan /root/bityuan/bityuan
|
|
|
|
+[ -e bityuan-cli ] && install bityuan-cli /root/bityuan/bityuan-cli
|
|
|
|
+[ -e bityuan.toml ] && install bityuan.toml /root/bityuan/bityuan.toml
|
|
|
|
+[ -e bty ] && install bty /root/bityuan/bty
|
|
|
|
+[ -e bty.conf ] && install bty.conf /etc/supervisor/conf.d/bty.conf
|
|
|
|
+
|
|
|
|
+supervisorctl reload
|
|
|
|
|
|
sleep 15
|
|
sleep 15
|
|
set -x
|
|
set -x
|
|
started=`ps aux | grep bityuan -w | grep -v grep | wc -l`
|
|
started=`ps aux | grep bityuan -w | grep -v grep | wc -l`
|
|
-[ $started = 1 ] || supervisorctl restart chain33
|
|
|
|
|
|
+[ $started = 1 ] || supervisorctl restart bty
|
|
|
|
|
|
sleep 15
|
|
sleep 15
|
|
-started=`ps aux | grep bityuan -w | grep -v grep | wc -l`
|
|
|
|
|
|
+started=`ps aux | grep bityuan -w | grep bityuan.toml | grep -v grep | wc -l`
|
|
[ $started = 1 ] && echo "update bityuan success!"
|
|
[ $started = 1 ] && echo "update bityuan success!"
|
|
[ $started != 1 ] && echo "update bityuan failed!"
|
|
[ $started != 1 ] && echo "update bityuan failed!"
|