From 69fac8189a2d1f9932f7d7eaa4515dc0567a889f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Sat, 23 May 2020 01:08:23 +0200 Subject: [PATCH] Use file descriptor instead of sleep to keep input pipe open --- entrypoint.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 1bbded3..f984963 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -11,24 +11,24 @@ setup() { bridge-cli - echo "login" > $INPIPE - echo "$BRIDGE_USER" > $INPIPE - echo "$BRIDGE_PASS" > $INPIPE - echo "exit" > $INPIPE + echo "login" >&3 + echo "$BRIDGE_USER" >&3 + echo "$BRIDGE_PASS" >&3 + echo "exit" >&3 wait $bridge_pid } bridge-cli() { mkfifo $INPIPE - sleep infinity > $INPIPE & $BRIDGE --cli < $INPIPE & + exec 3> $INPIPE bridge_pid=$! } start() { bridge-cli - echo "info" > $INPIPE + echo "info" >&3 wait $bridge_pid }