Monitor geth to restart by shell

while true
do
procnum=` ps -ef|grep "geth"|grep -v grep|wc -l`
if [ $procnum -eq 0 ]; then
# ./geth --fast --testnet --nat=none -rpc -rpcapi db,eth,net,web3, personal,admin,miner -rpcaddr 0.0.0.0 -rpcport 8545 -mine console
screen ./geth --fast --testnet --nat=none -rpc -rpcapi db,eth,net,web3,personal,admin,miner -rpcaddr 0.0.0.0 --rpccorsdomain http://119.23.108.120:8000 -mine --maxpeers=10 console
fi
sleep 30
done

posted on 2018-03-05 17:28  Water208  阅读(108)  评论(0)    收藏  举报

导航