fixed eth.sh

This commit is contained in:
cubedro 2015-05-12 05:11:17 +03:00
parent 0d37a7e7bc
commit b9b2ddd240

View File

@ -1,8 +1,8 @@
#!/bin/bash #!/usr/bin/env bash
trap "exit" INT trap "exit" INT
if [[ -f `which ec2metadata 2>/dev/null` ]] if [[ -f $(which ec2metadata 2>/dev/null) ]]
then then
# If ec2 instance then get ips from ec2metadata # If ec2 instance then get ips from ec2metadata
LOCALIP=$(ec2metadata --local-ipv4) LOCALIP=$(ec2metadata --local-ipv4)
@ -13,10 +13,10 @@ else
IP=$(dig +short myip.opendns.com @resolver1.opendns.com) IP=$(dig +short myip.opendns.com @resolver1.opendns.com)
fi fi
if [[ -f `which geth 2>/dev/null` ]] if [[ -f $(which geth 2>/dev/null) ]]
then then
geth -rpc -maxpeers "50" -verbosity "3" -bootnodes "enode://09fbeec0d047e9a37e63f60f8618aa9df0e49271f3fadb2c070dc09e2099b95827b63a8b837c6fd01d0802d457dd83e3bd48bd3e6509f8209ed90dabbc30e3d3@52.16.188.185:30303" -nat "extip:$IP" geth -rpc -maxpeers "50" -verbosity "3" -bootnodes "enode://09fbeec0d047e9a37e63f60f8618aa9df0e49271f3fadb2c070dc09e2099b95827b63a8b837c6fd01d0802d457dd83e3bd48bd3e6509f8209ed90dabbc30e3d3@52.16.188.185:30303" -nat "extip:$IP"
elif [[ -f `which eth 2>/dev/null` ]] elif [[ -f $(which eth 2>/dev/null) ]]
then then
eth --bootstrap --peers 50 --remote 52.16.188.185:30303 --mining off --json-rpc --listen-ip $LOCALIP -v 5 eth --bootstrap --peers 50 --remote 52.16.188.185:30303 --mining off --json-rpc --listen-ip $LOCALIP -v 5
else else