diff --git a/Containers/docker-socket-proxy/healthcheck.sh b/Containers/docker-socket-proxy/healthcheck.sh index d89deb6b..560909ee 100644 --- a/Containers/docker-socket-proxy/healthcheck.sh +++ b/Containers/docker-socket-proxy/healthcheck.sh @@ -1,4 +1,8 @@ #!/bin/bash +if [ "$AIO_LOG_LEVEL" = 'debug' ]; then + set -x +fi + nc -z "$NEXTCLOUD_HOST" 9001 || exit 0 nc -z 127.0.0.1 2375 || exit 1 diff --git a/Containers/docker-socket-proxy/start.sh b/Containers/docker-socket-proxy/start.sh index 657c914e..896b5248 100644 --- a/Containers/docker-socket-proxy/start.sh +++ b/Containers/docker-socket-proxy/start.sh @@ -1,5 +1,9 @@ #!/bin/sh +if [ "$AIO_LOG_LEVEL" = 'debug' ]; then + set -x +fi + # Only start container if nextcloud is accessible while ! nc -z "$NEXTCLOUD_HOST" 9001; do echo "Waiting for Nextcloud to start..." @@ -18,6 +22,8 @@ else HAPROXYFILE="$(sed "s# || { src NC_IPV6_PLACEHOLDER }##g" /tmp/haproxy.cfg)" fi echo "$HAPROXYFILE" > /tmp/haproxy.cfg -set +x +if [ "$AIO_LOG_LEVEL" != 'debug' ]; then + set +x +fi haproxy -f /tmp/haproxy.cfg -db