mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-03 10:33:45 +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
|
||||
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"
|
||||
else
|
||||
NAT_FLAG="--nat=none"
|
||||
fi
|
||||
|
||||
|
||||
# (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
|
||||
echo "Starting bootnode"
|
||||
|
|
|
|||
Loading…
Reference in a new issue