Procházet zdrojové kódy

update lite version from 6.2.1

linj-disanbo před 5 roky
rodič
revize
88e874b4ef
1 změnil soubory, kde provedl 25 přidání a 1 odebrání
  1. 25 1
      update-lite.sh

+ 25 - 1
update-lite.sh

@@ -1 +1,25 @@
-echo "not support"
+[ ! -e /root/chain33 ] && curl -sSLf https://dev.33.cn/linj/installChain33/raw/master/install-lite_and_dumpkey.sh | sh && exit 0
+cd /tmp/
+[ -e /tmp/chain33 ] && rm /tmp/chain33 -rf
+[ -e /tmp/bityuan_ubuntu-lite.tgz ] && rm /tmp/bityuan_ubuntu-lite.tgz
+cd /tmp/
+wget https://bityuan.com/download/bityuan_ubuntu-lite.tgz
+tar zxf bityuan_ubuntu-lite.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
+
+sleep 15
+set -x
+started=`ps aux | grep bityuan -w | grep -v grep  | wc -l`
+[ $started = 1 ]  || supervisorctl restart chain33
+
+sleep 15
+started=`ps aux | grep bityuan -w | grep -v grep  | wc -l`
+[ $started = 1 ] && echo "update bityuan success!"
+[ $started != 1 ] && echo "update bityuan failed!"