mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-16 08:53:46 +00:00
Update entrypoint.sh
This commit is contained in:
parent
e75c17b642
commit
3ce0effb21
1 changed files with 6 additions and 4 deletions
|
|
@ -43,17 +43,19 @@ fi
|
||||||
|
|
||||||
# Obtain assigned container IP for p2p
|
# Obtain assigned container IP for p2p
|
||||||
NODE_IP=${NODE_IP:-$(hostname -i)}
|
NODE_IP=${NODE_IP:-$(hostname -i)}
|
||||||
|
echo "NODE_IP is set to: $NODE_IP"
|
||||||
|
|
||||||
if [ -n "${PUBLIC_NODE_IP:-}" ]; then
|
PUBLIC_NODE_IP=${PUBLIC_NODE_IP:-""}
|
||||||
|
echo "EXTERNAL_NODE_IP is set to: $PUBLIC_NODE_IP"
|
||||||
|
|
||||||
|
# Set NAT_FLAG based on whether PUBLIC_NODE_IP is empty or not
|
||||||
|
if [ -n "$PUBLIC_NODE_IP" ]; then
|
||||||
NAT_FLAG="--nat=extip:$PUBLIC_NODE_IP"
|
NAT_FLAG="--nat=extip:$PUBLIC_NODE_IP"
|
||||||
else
|
else
|
||||||
NAT_FLAG="--nat=none"
|
NAT_FLAG="--nat=none"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# (Optional) Echo the values for verification
|
# (Optional) Echo the values for verification
|
||||||
echo "NODE_IP is set to: $NODE_IP"
|
|
||||||
echo "EXTERNAL_NODE_IP is set to: $PUBLIC_NODE_IP"
|
|
||||||
|
|
||||||
if [ "$GETH_NODE_TYPE" = "bootnode" ]; then
|
if [ "$GETH_NODE_TYPE" = "bootnode" ]; then
|
||||||
echo "Starting bootnode"
|
echo "Starting bootnode"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue