From e563da2a062a2f76b4516ca1cd7f8dd74e19039c Mon Sep 17 00:00:00 2001 From: Chris Gianelloni Date: Tue, 21 Jan 2025 10:47:26 -0500 Subject: [PATCH] feat: nohup socat into the background, if configured (#221) 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} \