mirror of
https://github.com/ggogel/seafile-containerized.git
synced 2024-11-16 09:01:38 +00:00
wait until seafile-server is connectable before starting socat
This commit is contained in:
parent
f9eca5c59a
commit
774ba43d4b
|
@ -13,10 +13,11 @@ function start_seahub {
|
|||
|
||||
function start_socat {
|
||||
mkdir -p /opt/seafile/seafile-server-latest/runtime
|
||||
while true; do
|
||||
echo "Starting socat..."
|
||||
socat -d -d UNIX-LISTEN:/opt/seafile/seafile-server-latest/runtime/seafile.sock,fork TCP:seafile-server:8001,forever,keepalive,keepidle=10,keepintvl=10,keepcnt=2
|
||||
while ! nc -z seafile-server 8001 2>/dev/null; do
|
||||
sleep 1
|
||||
done
|
||||
echo "Starting socat..."
|
||||
socat -d -d UNIX-LISTEN:/opt/seafile/seafile-server-latest/runtime/seafile.sock,fork TCP:seafile-server:8001,forever,keepalive,keepidle=10,keepintvl=10,keepcnt=2
|
||||
}
|
||||
|
||||
function watch_server {
|
||||
|
|
Loading…
Reference in a new issue