Para el correcto funcionamiento del script, la configuración hay que establecerla en el archivo env:
vim env
Ejemplo de configuración:
CCLI="${HOME}/.local/bin/cardano-cli" # Override automatic detection of path to cardano-cli executable
#CNCLI="${HOME}/.cargo/bin/cncli" # Override automatic detection of path to cncli executable (https://github.com/AndrewWestberg/cncli)
CNODE_HOME="${HOME}/cnode" # Override default CNODE_HOME path (defaults to /opt/cardano/cnode)
CNODE_PORT=3001 # Set node port
CONFIG="${CNODE_HOME}/config/mainnet-config.json" # Override automatic detection of node config path
SOCKET="${CNODE_HOME}/sockets/node0.socket" # Override automatic detection of path to socket
#EKG_HOST=127.0.0.1 # Set node EKG host
EKG_PORT=12798 # Override automatic detection of node EKG port
#EKG_TIMEOUT=3 # Maximum time in seconds that you allow EKG request to take before aborting (node metrics)
#CURL_TIMEOUT=10 # Maximum time in seconds that you allow curl file download to take before aborting (GitHub update process)
#BLOCKLOG_DIR="${CNODE_HOME}/guild-db/blocklog" # Override default directory used to store block data for core node
#BLOCKLOG_TZ="UTC" # TimeZone to use when displaying blocklog - https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
Ejecutamos el script.
./topologyUpdater.sh
{ "resultcode": "201", "datetime":"2020-08-13 09:24:17", "clientIp": "xxx.xxx.xxx.xx", "iptype": 4, "msg": "nice to meet you" }
Vamos a usar crontab para automatizar la ejecución del script ./topologyUpdater.sh