From 5de286e2331576d18bc8956d058757cc90968b0d Mon Sep 17 00:00:00 2001 From: Djeex Date: Wed, 24 Sep 2025 12:43:45 +0200 Subject: [PATCH] Fixed variable and log order + listen path --- entrypoint.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 1979fb5..ff492b1 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -33,10 +33,13 @@ echo "Starting socat proxy..." echo "UNIX socket: $UNIX_SOCKET_PATH" echo "TCP target: $TARGET_HOST:$TARGET_PORT" echo "HOST path: $HOST_SOCKET_PATH" +echo "Socket name: $UNIX_SOCKET_NAME" + +# Calculate full socket path +FULL_SOCKET_PATH="$HOST_SOCKET_PATH/$UNIX_SOCKET_NAME" echo "Full socket path: $FULL_SOCKET_PATH" # Check if socket file/folder exists and handle it -FULL_SOCKET_PATH="$HOST_SOCKET_PATH/$UNIX_SOCKET_NAME" if [ -e "$FULL_SOCKET_PATH" ]; then echo "Socket file/folder $FULL_SOCKET_PATH exists, removing it..." if rm -rf "$FULL_SOCKET_PATH"; then @@ -89,7 +92,7 @@ trap cleanup SIGTERM SIGINT echo "Starting socat proxy..." # Start socat with verbose logging and redirect to stdout/stderr -if socat -d -d UNIX-LISTEN:$UNIX_SOCKET_PATH,fork,unlink-early TCP:$TARGET_HOST:$TARGET_PORT & then +if socat -d -d UNIX-LISTEN:$FULL_SOCKET_PATH,fork,unlink-early TCP:$TARGET_HOST:$TARGET_PORT & then SOCAT_PID=$! echo "SUCCESS: Socat started with PID: $SOCAT_PID" echo "Container is ready and running..."