Skip to content

Commit e563da2

Browse files
authored
feat: nohup socat into the background, if configured (#221)
Signed-off-by: Chris Gianelloni <[email protected]>
1 parent 68e3738 commit e563da2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

bin/run-node

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,13 @@ elif [[ ${RESTORE_SNAPSHOT} == true ]]; then
123123
echo "Detected populated ${CARDANO_DATABASE_PATH}... skipping restore"
124124
fi
125125

126+
cd ${CARDANO_DATABASE_PATH}
127+
128+
if [[ ${SOCAT_PORT:-0} != 0 ]]; then
129+
echo "Port ${SOCAT_PORT} configured for socat... launching in background"
130+
nohup socat TCP-LISTEN:${SOCAT_PORT},fork UNIX-CLIENT:${CARDANO_SOCKET_PATH},ignoreeof &
131+
fi
132+
126133
if [[ ${CARDANO_BLOCK_PRODUCER} == true ]]; then
127134
effopts=(--config ${CARDANO_CONFIG} \
128135
--database-path ${CARDANO_DATABASE_PATH} \

0 commit comments

Comments
 (0)