mirror of
https://github.com/logos-storage/logos-storage-DAppNodePackage.git
synced 2026-01-02 21:33:09 +00:00
feat: adjust package to codex 0.2.0
This commit is contained in:
parent
6f8598ecd0
commit
2eb28bd731
@ -12,7 +12,7 @@ fi
|
||||
# Parameters
|
||||
if [[ -z "${CODEX_NAT}" ]]; then
|
||||
if [[ "${NAT_IP_AUTO}" == "true" && -z "${NAT_PUBLIC_IP_AUTO}" ]]; then
|
||||
export CODEX_NAT=$(hostname --ip-address)
|
||||
export CODEX_NAT="extip:$(hostname --ip-address)"
|
||||
echo "Private: CODEX_NAT=${CODEX_NAT}"
|
||||
elif [[ -n "${NAT_PUBLIC_IP_AUTO}" ]]; then
|
||||
# Run for 60 seconds if fail
|
||||
@ -20,9 +20,10 @@ if [[ -z "${CODEX_NAT}" ]]; then
|
||||
SECONDS=0
|
||||
SLEEP=5
|
||||
while (( SECONDS < WAIT )); do
|
||||
export CODEX_NAT=$(curl -s -f -m 5 "${NAT_PUBLIC_IP_AUTO}")
|
||||
IP=$(curl -s -f -m 5 "${NAT_PUBLIC_IP_AUTO}")
|
||||
# Check if exit code is 0 and returned value is not empty
|
||||
if [[ $? -eq 0 && -n "${CODEX_NAT}" ]]; then
|
||||
if [[ $? -eq 0 && -n "${IP}" ]]; then
|
||||
export CODEX_NAT="extip:${IP}"
|
||||
echo "Public: CODEX_NAT=${CODEX_NAT}"
|
||||
break
|
||||
else
|
||||
|
||||
@ -109,8 +109,8 @@ fields:
|
||||
service: codex-node
|
||||
title: CODEX_NAT
|
||||
description: >-
|
||||
Public IP address to announce behind a NAT.
|
||||
pattern: "^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]?|0).){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]?|0)$"
|
||||
Specify method to use for determining public address. Must be one of: `any`, `none`, `upnp`, `pmp`, `extip:<IP>`, default = `any`. Check the [docs](https://docs.codex.storage/learn/run#nat-configuration) for more details.
|
||||
pattern: "^(any|none|upnp|pmp|extip:((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]?|0).){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]?|0))$"
|
||||
patternErrorMessage: Must be a valid IP address
|
||||
required: true
|
||||
if: { "IP_MODE": { "enum": ["manual"] } }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user