u
This commit is contained in:
		
							parent
							
								
									988d31dd22
								
							
						
					
					
						commit
						78de7d7010
					
				| @ -42,17 +42,17 @@ then | ||||
|   wget https://gethstore.blob.core.windows.net/builds/`curl -s -L -o - 'https://geth.ethereum.org/downloads' | grep -o -m 1 "geth-$OS-$ARCH-$VERSION-[0-9a-f]*.tar.gz" | head -n 1` -O geth-binary-temp.tgz | ||||
|   tar xzf ./geth-binary-temp.tgz # --strip-components 1 ## 去掉tar包中顶级目录,因为顶级目录含有checksum,不方便在下一步进入 | ||||
|   echo "--- 安装到 /usr/local/bin/geth" | ||||
|   mv ./geth-$OS-$ARCH-*/geth /usr/local/bin/ | ||||
|   sudo mv ./geth-$OS-$ARCH-*/geth /usr/local/bin/ | ||||
|   echo "--- 删除原始文件" | ||||
|   rm -fr ./geth-binary-temp.tgz ./geth-$OS-$ARCH-*/ | ||||
| elif [ "$BINARY_OR_SOURCE" == 's' ] | ||||
| then | ||||
|   echo "--- 克隆并编译 geth" | ||||
|   git clone -b v$VERSION https://github.com/ethereum/go-ethereum ./geth-temp/go-ethereum | ||||
|   mkdir -p ./geth-temp/ | ||||
|   pushd ./geth-temp/go-ethereum && make geth && popd # 或者 make all | ||||
|   mv ./geth-temp/go-ethereum/build/bin/geth /usr/local/bin/ | ||||
|   rm -fr ./geth-temp/ | ||||
|   mkdir -p ./geth-source-$VERSION/ | ||||
|   git clone -b v$VERSION https://github.com/ethereum/go-ethereum ./geth-source-$VERSION/go-ethereum | ||||
|   pushd ./geth-source-$VERSION/go-ethereum && make geth && popd # 或者 make all | ||||
|   sudo mv ./geth-source-$VERSION/go-ethereum/build/bin/geth /usr/local/bin/ | ||||
|   rm -fr ./geth-source-$VERSION/ | ||||
| else | ||||
|   echo "--- Nothing changed." | ||||
| fi | ||||
|  | ||||
| @ -34,8 +34,8 @@ done | ||||
| 
 | ||||
| if [ "$RUNPM2" == 'y' ] | ||||
| then | ||||
|   pm2 start -x 'geth' --name $DATADIR -- --datadir ./$DATADIR/ --http --http.addr 0.0.0.0 --http.port 6$KEYCODE --http.api eth,net,web3,personal,admin,miner,debug,txpool,shh --http.corsdomain "*" --nodiscover --networkid 6$KEYCODE --port 60$KEYCODE --allow-insecure-unlock  -unlock '0xbC0ab80eef0A86eF248993D3f59B73F142278fbc' --password ./keystore-password.txt --mine --miner.threads 1 | ||||
|   pm2 start -x 'geth' --name $DATADIR -- --datadir ./$DATADIR/ --http --http.addr 0.0.0.0 --http.port 6$KEYCODE --http.api eth,net,web3,personal,admin,miner,debug,txpool,shh --http.corsdomain "*" --nodiscover --networkid 6$KEYCODE --port 60$KEYCODE --allow-insecure-unlock  -unlock 0xbC0ab80eef0A86eF248993D3f59B73F142278fbc --password ./keystore-password.txt --mine --miner.etherbase 0xbC0ab80eef0A86eF248993D3f59B73F142278fbc --miner.threads 1 | ||||
| else | ||||
|   # 如果不是用 pm2 而是直接用 geth,那么可以在最后加 console。不提供password也可以,那就会在命令行提示输入。 | ||||
|   geth --datadir ./$DATADIR/ --http --http.addr 0.0.0.0 --http.port 6$KEYCODE --http.api eth,net,web3,personal,admin,miner,debug,txpool --http.corsdomain "*" --nodiscover --networkid 6$KEYCODE --port 60$KEYCODE --allow-insecure-unlock  -unlock '0xbC0ab80eef0A86eF248993D3f59B73F142278fbc' --password ./keystore-password.txt --mine --miner.threads 1 console | ||||
|   geth --datadir ./$DATADIR/ --http --http.addr 0.0.0.0 --http.port 6$KEYCODE --http.api eth,net,web3,personal,admin,miner,debug,txpool --http.corsdomain "*" --nodiscover --networkid 6$KEYCODE --port 60$KEYCODE --allow-insecure-unlock  -unlock 0xbC0ab80eef0A86eF248993D3f59B73F142278fbc --password ./keystore-password.txt --mine --miner.etherbase 0xbC0ab80eef0A86eF248993D3f59B73F142278fbc --miner.threads 1 console | ||||
| fi | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user