diff --git a/Containers/imaginary/healthcheck.sh b/Containers/imaginary/healthcheck.sh index 46d700fc..2179239d 100644 --- a/Containers/imaginary/healthcheck.sh +++ b/Containers/imaginary/healthcheck.sh @@ -1,3 +1,7 @@ #!/bin/bash +if [ "$AIO_LOG_LEVEL" = 'debug' ]; then + set -x +fi + nc -z 127.0.0.1 "$PORT" || exit 1 diff --git a/Containers/imaginary/start.sh b/Containers/imaginary/start.sh index 75c50292..4f6a4af7 100644 --- a/Containers/imaginary/start.sh +++ b/Containers/imaginary/start.sh @@ -1,5 +1,20 @@ #!/bin/bash +if [ "$AIO_LOG_LEVEL" = 'debug' ]; then + set -x +fi + +if [ "$AIO_LOG_LEVEL" = 'debug' ]; then + export DEBUG='*' + export GOLANG_LOG='info' +elif [ "$AIO_LOG_LEVEL" = 'info' ]; then + export GOLANG_LOG='info' +elif [ "$AIO_LOG_LEVEL" = 'warn' ]; then + export GOLANG_LOG='warning' +else + export GOLANG_LOG='error' +fi + echo "Imaginary has started" IMAGINARY_ARGS=(-return-size -max-allowed-resolution 222.2)