From abda13d4a9fce2036e2da90b6ae80eb7e8a2569e Mon Sep 17 00:00:00 2001 From: Chris Gianelloni Date: Mon, 20 Jan 2025 22:04:20 -0500 Subject: [PATCH] feat: nohup socat into the background, if configured Signed-off-by: Chris Gianelloni --- bin/run-node | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bin/run-node b/bin/run-node index e35ef85..2d2f6c8 100755 --- a/bin/run-node +++ b/bin/run-node @@ -123,6 +123,13 @@ elif [[ ${RESTORE_SNAPSHOT} == true ]]; then echo "Detected populated ${CARDANO_DATABASE_PATH}... skipping restore" fi +cd ${CARDANO_DATABASE_PATH} + +if [[ ${SOCAT_PORT:-0} != 0 ]]; then + echo "Port ${SOCAT_PORT} configured for socat... launching in background" + nohup socat TCP-LISTEN:${SOCAT_PORT},fork UNIX-CLIENT:${CARDANO_SOCKET_PATH},ignoreeof & +fi + if [[ ${CARDANO_BLOCK_PRODUCER} == true ]]; then effopts=(--config ${CARDANO_CONFIG} \ --database-path ${CARDANO_DATABASE_PATH} \