run socat in endless loop

This commit is contained in:
Gerrit Gogel 2021-02-02 00:31:01 +01:00
parent 6b76910d36
commit 2c3437df5d

View file

@ -13,11 +13,13 @@ function start_seahub {
function start_socat {
mkdir -p /opt/seafile/seafile-server-latest/runtime
while ! nc -z seafile-server 8001 2>/dev/null; do
sleep 1
while true; do
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
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 {