diff --git a/Dockerfiles/server-pgsql/alpine/docker-entrypoint.sh b/Dockerfiles/server-pgsql/alpine/docker-entrypoint.sh index af1bac9ba..e57992004 100755 --- a/Dockerfiles/server-pgsql/alpine/docker-entrypoint.sh +++ b/Dockerfiles/server-pgsql/alpine/docker-entrypoint.sh @@ -182,7 +182,8 @@ check_db_connect_postgresql() { fi if [ -n "${ZBX_DBTLSCONNECT}" ]; then - export PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + export PGSSLMODE=${PGSSLMODE//required/require} export PGSSLROOTCERT=${ZBX_DBTLSCAFILE} export PGSSLCERT=${ZBX_DBTLSCERTFILE} export PGSSLKEY=${ZBX_DBTLSKEYFILE} @@ -221,7 +222,8 @@ psql_query() { fi if [ -n "${ZBX_DBTLSCONNECT}" ]; then - export PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + export PGSSLMODE=${PGSSLMODE//required/require} export PGSSLROOTCERT=${ZBX_DBTLSCAFILE} export PGSSLCERT=${ZBX_DBTLSCERTFILE} export PGSSLKEY=${ZBX_DBTLSKEYFILE} @@ -256,7 +258,8 @@ create_db_database_postgresql() { fi if [ -n "${ZBX_DBTLSCONNECT}" ]; then - export PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + export PGSSLMODE=${PGSSLMODE//required/require} export PGSSLROOTCERT=${ZBX_DBTLSCAFILE} export PGSSLCERT=${ZBX_DBTLSCERTFILE} export PGSSLKEY=${ZBX_DBTLSKEYFILE} @@ -304,7 +307,8 @@ create_db_schema_postgresql() { fi if [ -n "${ZBX_DBTLSCONNECT}" ]; then - export PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + export PGSSLMODE=${PGSSLMODE//required/require} export PGSSLROOTCERT=${ZBX_DBTLSCAFILE} export PGSSLCERT=${ZBX_DBTLSCERTFILE} export PGSSLKEY=${ZBX_DBTLSKEYFILE} diff --git a/Dockerfiles/server-pgsql/centos/docker-entrypoint.sh b/Dockerfiles/server-pgsql/centos/docker-entrypoint.sh index af1bac9ba..e57992004 100755 --- a/Dockerfiles/server-pgsql/centos/docker-entrypoint.sh +++ b/Dockerfiles/server-pgsql/centos/docker-entrypoint.sh @@ -182,7 +182,8 @@ check_db_connect_postgresql() { fi if [ -n "${ZBX_DBTLSCONNECT}" ]; then - export PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + export PGSSLMODE=${PGSSLMODE//required/require} export PGSSLROOTCERT=${ZBX_DBTLSCAFILE} export PGSSLCERT=${ZBX_DBTLSCERTFILE} export PGSSLKEY=${ZBX_DBTLSKEYFILE} @@ -221,7 +222,8 @@ psql_query() { fi if [ -n "${ZBX_DBTLSCONNECT}" ]; then - export PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + export PGSSLMODE=${PGSSLMODE//required/require} export PGSSLROOTCERT=${ZBX_DBTLSCAFILE} export PGSSLCERT=${ZBX_DBTLSCERTFILE} export PGSSLKEY=${ZBX_DBTLSKEYFILE} @@ -256,7 +258,8 @@ create_db_database_postgresql() { fi if [ -n "${ZBX_DBTLSCONNECT}" ]; then - export PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + export PGSSLMODE=${PGSSLMODE//required/require} export PGSSLROOTCERT=${ZBX_DBTLSCAFILE} export PGSSLCERT=${ZBX_DBTLSCERTFILE} export PGSSLKEY=${ZBX_DBTLSKEYFILE} @@ -304,7 +307,8 @@ create_db_schema_postgresql() { fi if [ -n "${ZBX_DBTLSCONNECT}" ]; then - export PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + export PGSSLMODE=${PGSSLMODE//required/require} export PGSSLROOTCERT=${ZBX_DBTLSCAFILE} export PGSSLCERT=${ZBX_DBTLSCERTFILE} export PGSSLKEY=${ZBX_DBTLSKEYFILE} diff --git a/Dockerfiles/server-pgsql/ol/docker-entrypoint.sh b/Dockerfiles/server-pgsql/ol/docker-entrypoint.sh index af1bac9ba..e57992004 100755 --- a/Dockerfiles/server-pgsql/ol/docker-entrypoint.sh +++ b/Dockerfiles/server-pgsql/ol/docker-entrypoint.sh @@ -182,7 +182,8 @@ check_db_connect_postgresql() { fi if [ -n "${ZBX_DBTLSCONNECT}" ]; then - export PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + export PGSSLMODE=${PGSSLMODE//required/require} export PGSSLROOTCERT=${ZBX_DBTLSCAFILE} export PGSSLCERT=${ZBX_DBTLSCERTFILE} export PGSSLKEY=${ZBX_DBTLSKEYFILE} @@ -221,7 +222,8 @@ psql_query() { fi if [ -n "${ZBX_DBTLSCONNECT}" ]; then - export PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + export PGSSLMODE=${PGSSLMODE//required/require} export PGSSLROOTCERT=${ZBX_DBTLSCAFILE} export PGSSLCERT=${ZBX_DBTLSCERTFILE} export PGSSLKEY=${ZBX_DBTLSKEYFILE} @@ -256,7 +258,8 @@ create_db_database_postgresql() { fi if [ -n "${ZBX_DBTLSCONNECT}" ]; then - export PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + export PGSSLMODE=${PGSSLMODE//required/require} export PGSSLROOTCERT=${ZBX_DBTLSCAFILE} export PGSSLCERT=${ZBX_DBTLSCERTFILE} export PGSSLKEY=${ZBX_DBTLSKEYFILE} @@ -304,7 +307,8 @@ create_db_schema_postgresql() { fi if [ -n "${ZBX_DBTLSCONNECT}" ]; then - export PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + export PGSSLMODE=${PGSSLMODE//required/require} export PGSSLROOTCERT=${ZBX_DBTLSCAFILE} export PGSSLCERT=${ZBX_DBTLSCERTFILE} export PGSSLKEY=${ZBX_DBTLSKEYFILE} diff --git a/Dockerfiles/server-pgsql/ubuntu/docker-entrypoint.sh b/Dockerfiles/server-pgsql/ubuntu/docker-entrypoint.sh index d08fca4dd..16ad187f4 100755 --- a/Dockerfiles/server-pgsql/ubuntu/docker-entrypoint.sh +++ b/Dockerfiles/server-pgsql/ubuntu/docker-entrypoint.sh @@ -182,7 +182,8 @@ check_db_connect_postgresql() { fi if [ -n "${ZBX_DBTLSCONNECT}" ]; then - export PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + export PGSSLMODE=${PGSSLMODE//required/require} export PGSSLROOTCERT=${ZBX_DBTLSCAFILE} export PGSSLCERT=${ZBX_DBTLSCERTFILE} export PGSSLKEY=${ZBX_DBTLSKEYFILE} @@ -221,7 +222,8 @@ psql_query() { fi if [ -n "${ZBX_DBTLSCONNECT}" ]; then - export PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + export PGSSLMODE=${PGSSLMODE//required/require} export PGSSLROOTCERT=${ZBX_DBTLSCAFILE} export PGSSLCERT=${ZBX_DBTLSCERTFILE} export PGSSLKEY=${ZBX_DBTLSKEYFILE} @@ -256,7 +258,8 @@ create_db_database_postgresql() { fi if [ -n "${ZBX_DBTLSCONNECT}" ]; then - export PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + export PGSSLMODE=${PGSSLMODE//required/require} export PGSSLROOTCERT=${ZBX_DBTLSCAFILE} export PGSSLCERT=${ZBX_DBTLSCERTFILE} export PGSSLKEY=${ZBX_DBTLSKEYFILE} @@ -304,7 +307,8 @@ create_db_schema_postgresql() { fi if [ -n "${ZBX_DBTLSCONNECT}" ]; then - export PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + export PGSSLMODE=${PGSSLMODE//required/require} export PGSSLROOTCERT=${ZBX_DBTLSCAFILE} export PGSSLCERT=${ZBX_DBTLSCERTFILE} export PGSSLKEY=${ZBX_DBTLSKEYFILE} diff --git a/Dockerfiles/web-apache-pgsql/alpine/docker-entrypoint.sh b/Dockerfiles/web-apache-pgsql/alpine/docker-entrypoint.sh index 19f0ed396..3349c5e71 100755 --- a/Dockerfiles/web-apache-pgsql/alpine/docker-entrypoint.sh +++ b/Dockerfiles/web-apache-pgsql/alpine/docker-entrypoint.sh @@ -99,7 +99,8 @@ check_db_connect() { fi if [ -n "${ZBX_DBTLSCONNECT}" ]; then - export PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + export PGSSLMODE=${PGSSLMODE//required/require} export PGSSLROOTCERT=${ZBX_DBTLSCAFILE} export PGSSLCERT=${ZBX_DBTLSCERTFILE} export PGSSLKEY=${ZBX_DBTLSKEYFILE} diff --git a/Dockerfiles/web-apache-pgsql/centos/docker-entrypoint.sh b/Dockerfiles/web-apache-pgsql/centos/docker-entrypoint.sh index eab82a752..be1dc4d6b 100755 --- a/Dockerfiles/web-apache-pgsql/centos/docker-entrypoint.sh +++ b/Dockerfiles/web-apache-pgsql/centos/docker-entrypoint.sh @@ -99,7 +99,8 @@ check_db_connect() { fi if [ -n "${ZBX_DBTLSCONNECT}" ]; then - export PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + export PGSSLMODE=${PGSSLMODE//required/require} export PGSSLROOTCERT=${ZBX_DBTLSCAFILE} export PGSSLCERT=${ZBX_DBTLSCERTFILE} export PGSSLKEY=${ZBX_DBTLSKEYFILE} diff --git a/Dockerfiles/web-apache-pgsql/ol/docker-entrypoint.sh b/Dockerfiles/web-apache-pgsql/ol/docker-entrypoint.sh index eab82a752..be1dc4d6b 100755 --- a/Dockerfiles/web-apache-pgsql/ol/docker-entrypoint.sh +++ b/Dockerfiles/web-apache-pgsql/ol/docker-entrypoint.sh @@ -99,7 +99,8 @@ check_db_connect() { fi if [ -n "${ZBX_DBTLSCONNECT}" ]; then - export PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + export PGSSLMODE=${PGSSLMODE//required/require} export PGSSLROOTCERT=${ZBX_DBTLSCAFILE} export PGSSLCERT=${ZBX_DBTLSCERTFILE} export PGSSLKEY=${ZBX_DBTLSKEYFILE} diff --git a/Dockerfiles/web-apache-pgsql/ubuntu/docker-entrypoint.sh b/Dockerfiles/web-apache-pgsql/ubuntu/docker-entrypoint.sh index 72adff195..d21d8a06a 100755 --- a/Dockerfiles/web-apache-pgsql/ubuntu/docker-entrypoint.sh +++ b/Dockerfiles/web-apache-pgsql/ubuntu/docker-entrypoint.sh @@ -99,7 +99,8 @@ check_db_connect() { fi if [ -n "${ZBX_DBTLSCONNECT}" ]; then - export PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + export PGSSLMODE=${PGSSLMODE//required/require} export PGSSLROOTCERT=${ZBX_DBTLSCAFILE} export PGSSLCERT=${ZBX_DBTLSCERTFILE} export PGSSLKEY=${ZBX_DBTLSKEYFILE} diff --git a/Dockerfiles/web-nginx-pgsql/alpine/docker-entrypoint.sh b/Dockerfiles/web-nginx-pgsql/alpine/docker-entrypoint.sh index 9dce1270a..f11225271 100755 --- a/Dockerfiles/web-nginx-pgsql/alpine/docker-entrypoint.sh +++ b/Dockerfiles/web-nginx-pgsql/alpine/docker-entrypoint.sh @@ -99,7 +99,8 @@ check_db_connect() { fi if [ -n "${ZBX_DBTLSCONNECT}" ]; then - export PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + export PGSSLMODE=${PGSSLMODE//required/require} export PGSSLROOTCERT=${ZBX_DBTLSCAFILE} export PGSSLCERT=${ZBX_DBTLSCERTFILE} export PGSSLKEY=${ZBX_DBTLSKEYFILE} diff --git a/Dockerfiles/web-nginx-pgsql/centos/docker-entrypoint.sh b/Dockerfiles/web-nginx-pgsql/centos/docker-entrypoint.sh index d5138facf..3ee620e4c 100755 --- a/Dockerfiles/web-nginx-pgsql/centos/docker-entrypoint.sh +++ b/Dockerfiles/web-nginx-pgsql/centos/docker-entrypoint.sh @@ -99,7 +99,8 @@ check_db_connect() { fi if [ -n "${ZBX_DBTLSCONNECT}" ]; then - export PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + export PGSSLMODE=${PGSSLMODE//required/require} export PGSSLROOTCERT=${ZBX_DBTLSCAFILE} export PGSSLCERT=${ZBX_DBTLSCERTFILE} export PGSSLKEY=${ZBX_DBTLSKEYFILE} diff --git a/Dockerfiles/web-nginx-pgsql/ol/docker-entrypoint.sh b/Dockerfiles/web-nginx-pgsql/ol/docker-entrypoint.sh index d5138facf..3ee620e4c 100755 --- a/Dockerfiles/web-nginx-pgsql/ol/docker-entrypoint.sh +++ b/Dockerfiles/web-nginx-pgsql/ol/docker-entrypoint.sh @@ -99,7 +99,8 @@ check_db_connect() { fi if [ -n "${ZBX_DBTLSCONNECT}" ]; then - export PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + export PGSSLMODE=${PGSSLMODE//required/require} export PGSSLROOTCERT=${ZBX_DBTLSCAFILE} export PGSSLCERT=${ZBX_DBTLSCERTFILE} export PGSSLKEY=${ZBX_DBTLSKEYFILE} diff --git a/Dockerfiles/web-nginx-pgsql/ubuntu/docker-entrypoint.sh b/Dockerfiles/web-nginx-pgsql/ubuntu/docker-entrypoint.sh index 15140ce38..e8dfa1066 100755 --- a/Dockerfiles/web-nginx-pgsql/ubuntu/docker-entrypoint.sh +++ b/Dockerfiles/web-nginx-pgsql/ubuntu/docker-entrypoint.sh @@ -99,7 +99,8 @@ check_db_connect() { fi if [ -n "${ZBX_DBTLSCONNECT}" ]; then - export PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + PGSSLMODE=${ZBX_DBTLSCONNECT//_/-} + export PGSSLMODE=${PGSSLMODE//required/require} export PGSSLROOTCERT=${ZBX_DBTLSCAFILE} export PGSSLCERT=${ZBX_DBTLSCERTFILE} export PGSSLKEY=${ZBX_DBTLSKEYFILE}