added back listen-ip
This commit is contained in:
parent
f186b776b8
commit
99395e0e94
@ -5,14 +5,15 @@ 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)
|
||||||
IP=$(ec2metadata --public-ipv4)
|
IP=$(ec2metadata --public-ipv4)
|
||||||
else
|
else
|
||||||
# Else get IPs from ifconfig and dig
|
# Else get IPs from ifconfig and dig
|
||||||
# LOCALIP=$(ifconfig | grep 'inet ' | grep -v '127.0.0.1' | head -n1 | awk '{print $2}' | cut -d':' -f2)
|
LOCALIP=$(ifconfig | grep 'inet ' | grep -v '127.0.0.1' | head -n1 | awk '{print $2}' | cut -d':' -f2)
|
||||||
IP=$(dig +short myip.opendns.com @resolver1.opendns.com)
|
IP=$(dig +short myip.opendns.com @resolver1.opendns.com)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "Local IP: $LOCALIP"
|
||||||
echo "Public IP: $IP"
|
echo "Public IP: $IP"
|
||||||
|
|
||||||
if [[ -f $(which geth 2>/dev/null) ]]
|
if [[ -f $(which geth 2>/dev/null) ]]
|
||||||
@ -23,8 +24,8 @@ then
|
|||||||
elif [[ -f $(which eth 2>/dev/null) ]]
|
elif [[ -f $(which eth 2>/dev/null) ]]
|
||||||
then
|
then
|
||||||
echo "Starting eth"
|
echo "Starting eth"
|
||||||
echo eth --bootstrap --peers 50 --remote 52.16.188.185:30303 --mining off --json-rpc -v 5 --public-ip $IP
|
echo eth --bootstrap --peers 50 --remote 52.16.188.185:30303 --mining off --json-rpc -v 5 --public-ip $IP --listen-ip $LOCALIP
|
||||||
eth --bootstrap --peers 50 --remote 52.16.188.185:30303 --mining off --json-rpc -v 5 --public-ip $IP
|
eth --bootstrap --peers 50 --remote 52.16.188.185:30303 --mining off --json-rpc -v 5 --public-ip $IP --listen-ip $LOCALIP
|
||||||
else
|
else
|
||||||
echo "Ethereum was not found!"
|
echo "Ethereum was not found!"
|
||||||
exit 1;
|
exit 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user