From aa85043e2338a4647970d1878e9930b40579b0d0 Mon Sep 17 00:00:00 2001 From: Gerrit Gogel Date: Fri, 22 Jan 2021 23:33:28 +0100 Subject: [PATCH] seafile-server wait until searpc is available --- seafile/scripts/start.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/seafile/scripts/start.sh b/seafile/scripts/start.sh index 6904da3..167aff5 100644 --- a/seafile/scripts/start.sh +++ b/seafile/scripts/start.sh @@ -2,7 +2,11 @@ /scripts/create_data_links.sh -mkdir -p /opt/seafile/seafile-server-latest/runtime -socat -v -d -d TCP-LISTEN:8001,fork,forever UNIX:/opt/seafile/seafile-server-latest/runtime/seafile.sock,forever & +python3 /scripts/start.py & -python3 /scripts/start.py +while [ ! -S /opt/seafile/seafile-server-latest/runtime/seafile.sock ]; do + echo "Waiting for SeaRPC socket..." + sleep 1 +done + +socat -v -d -d TCP-LISTEN:8001,fork UNIX:/opt/seafile/seafile-server-latest/runtime/seafile.sock,forever \ No newline at end of file