mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2025-02-09 14:30:15 +01:00
Merge pull request #52 from zabbix/master
Fix PostgreSQL database check
This commit is contained in:
commit
67281424d7
@ -234,6 +234,8 @@ mysql_query() {
|
|||||||
|
|
||||||
psql_query() {
|
psql_query() {
|
||||||
query=$1
|
query=$1
|
||||||
|
db=$2
|
||||||
|
|
||||||
local result=""
|
local result=""
|
||||||
|
|
||||||
if [ -n "${DB_SERVER_ZBX_PASS}" ]; then
|
if [ -n "${DB_SERVER_ZBX_PASS}" ]; then
|
||||||
@ -241,7 +243,7 @@ psql_query() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
result=$(psql -A -q -t -h ${DB_SERVER_HOST} -p ${DB_SERVER_PORT} \
|
result=$(psql -A -q -t -h ${DB_SERVER_HOST} -p ${DB_SERVER_PORT} \
|
||||||
-U ${DB_SERVER_ROOT_USER} -c "$query" 2>/dev/null);
|
-U ${DB_SERVER_ROOT_USER} -c "$query" $db 2>/dev/null);
|
||||||
|
|
||||||
unset PGPASSWORD
|
unset PGPASSWORD
|
||||||
|
|
||||||
@ -337,11 +339,11 @@ create_db_schema_postgresql() {
|
|||||||
local type=$1
|
local type=$1
|
||||||
|
|
||||||
DBVERSION_TABLE_EXISTS=$(psql_query "SELECT 1 FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid =
|
DBVERSION_TABLE_EXISTS=$(psql_query "SELECT 1 FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid =
|
||||||
c.relnamespace WHERE n.nspname = 'public' AND c.relname = 'dbversion'")
|
c.relnamespace WHERE n.nspname = 'public' AND c.relname = 'dbversion'" "${DB_SERVER_DBNAME}")
|
||||||
|
|
||||||
if [ -n "${DBVERSION_TABLE_EXISTS}" ]; then
|
if [ -n "${DBVERSION_TABLE_EXISTS}" ]; then
|
||||||
echo "** Table '${DB_SERVER_DBNAME}.dbversion' already exists."
|
echo "** Table '${DB_SERVER_DBNAME}.dbversion' already exists."
|
||||||
ZBX_DB_VERSION=$(psql_query "SELECT mandatory FROM ${DB_SERVER_DBNAME}.dbversion")
|
ZBX_DB_VERSION=$(psql_query "SELECT mandatory FROM public.dbversion" "${DB_SERVER_DBNAME}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${ZBX_DB_VERSION}" ]; then
|
if [ -z "${ZBX_DB_VERSION}" ]; then
|
||||||
|
@ -234,6 +234,8 @@ mysql_query() {
|
|||||||
|
|
||||||
psql_query() {
|
psql_query() {
|
||||||
query=$1
|
query=$1
|
||||||
|
db=$2
|
||||||
|
|
||||||
local result=""
|
local result=""
|
||||||
|
|
||||||
if [ -n "${DB_SERVER_ZBX_PASS}" ]; then
|
if [ -n "${DB_SERVER_ZBX_PASS}" ]; then
|
||||||
@ -241,7 +243,7 @@ psql_query() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
result=$(psql -A -q -t -h ${DB_SERVER_HOST} -p ${DB_SERVER_PORT} \
|
result=$(psql -A -q -t -h ${DB_SERVER_HOST} -p ${DB_SERVER_PORT} \
|
||||||
-U ${DB_SERVER_ROOT_USER} -c "$query" 2>/dev/null);
|
-U ${DB_SERVER_ROOT_USER} -c "$query" $db 2>/dev/null);
|
||||||
|
|
||||||
unset PGPASSWORD
|
unset PGPASSWORD
|
||||||
|
|
||||||
@ -337,11 +339,11 @@ create_db_schema_postgresql() {
|
|||||||
local type=$1
|
local type=$1
|
||||||
|
|
||||||
DBVERSION_TABLE_EXISTS=$(psql_query "SELECT 1 FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid =
|
DBVERSION_TABLE_EXISTS=$(psql_query "SELECT 1 FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid =
|
||||||
c.relnamespace WHERE n.nspname = 'public' AND c.relname = 'dbversion'")
|
c.relnamespace WHERE n.nspname = 'public' AND c.relname = 'dbversion'" "${DB_SERVER_DBNAME}")
|
||||||
|
|
||||||
if [ -n "${DBVERSION_TABLE_EXISTS}" ]; then
|
if [ -n "${DBVERSION_TABLE_EXISTS}" ]; then
|
||||||
echo "** Table '${DB_SERVER_DBNAME}.dbversion' already exists."
|
echo "** Table '${DB_SERVER_DBNAME}.dbversion' already exists."
|
||||||
ZBX_DB_VERSION=$(psql_query "SELECT mandatory FROM ${DB_SERVER_DBNAME}.dbversion")
|
ZBX_DB_VERSION=$(psql_query "SELECT mandatory FROM public.dbversion" "${DB_SERVER_DBNAME}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${ZBX_DB_VERSION}" ]; then
|
if [ -z "${ZBX_DB_VERSION}" ]; then
|
||||||
|
@ -234,6 +234,8 @@ mysql_query() {
|
|||||||
|
|
||||||
psql_query() {
|
psql_query() {
|
||||||
query=$1
|
query=$1
|
||||||
|
db=$2
|
||||||
|
|
||||||
local result=""
|
local result=""
|
||||||
|
|
||||||
if [ -n "${DB_SERVER_ZBX_PASS}" ]; then
|
if [ -n "${DB_SERVER_ZBX_PASS}" ]; then
|
||||||
@ -241,7 +243,7 @@ psql_query() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
result=$(psql -A -q -t -h ${DB_SERVER_HOST} -p ${DB_SERVER_PORT} \
|
result=$(psql -A -q -t -h ${DB_SERVER_HOST} -p ${DB_SERVER_PORT} \
|
||||||
-U ${DB_SERVER_ROOT_USER} -c "$query" 2>/dev/null);
|
-U ${DB_SERVER_ROOT_USER} -c "$query" $db 2>/dev/null);
|
||||||
|
|
||||||
unset PGPASSWORD
|
unset PGPASSWORD
|
||||||
|
|
||||||
@ -337,11 +339,11 @@ create_db_schema_postgresql() {
|
|||||||
local type=$1
|
local type=$1
|
||||||
|
|
||||||
DBVERSION_TABLE_EXISTS=$(psql_query "SELECT 1 FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid =
|
DBVERSION_TABLE_EXISTS=$(psql_query "SELECT 1 FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid =
|
||||||
c.relnamespace WHERE n.nspname = 'public' AND c.relname = 'dbversion'")
|
c.relnamespace WHERE n.nspname = 'public' AND c.relname = 'dbversion'" "${DB_SERVER_DBNAME}")
|
||||||
|
|
||||||
if [ -n "${DBVERSION_TABLE_EXISTS}" ]; then
|
if [ -n "${DBVERSION_TABLE_EXISTS}" ]; then
|
||||||
echo "** Table '${DB_SERVER_DBNAME}.dbversion' already exists."
|
echo "** Table '${DB_SERVER_DBNAME}.dbversion' already exists."
|
||||||
ZBX_DB_VERSION=$(psql_query "SELECT mandatory FROM ${DB_SERVER_DBNAME}.dbversion")
|
ZBX_DB_VERSION=$(psql_query "SELECT mandatory FROM public.dbversion" "${DB_SERVER_DBNAME}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${ZBX_DB_VERSION}" ]; then
|
if [ -z "${ZBX_DB_VERSION}" ]; then
|
||||||
|
@ -234,6 +234,8 @@ mysql_query() {
|
|||||||
|
|
||||||
psql_query() {
|
psql_query() {
|
||||||
query=$1
|
query=$1
|
||||||
|
db=$2
|
||||||
|
|
||||||
local result=""
|
local result=""
|
||||||
|
|
||||||
if [ -n "${DB_SERVER_ZBX_PASS}" ]; then
|
if [ -n "${DB_SERVER_ZBX_PASS}" ]; then
|
||||||
@ -241,7 +243,7 @@ psql_query() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
result=$(psql -A -q -t -h ${DB_SERVER_HOST} -p ${DB_SERVER_PORT} \
|
result=$(psql -A -q -t -h ${DB_SERVER_HOST} -p ${DB_SERVER_PORT} \
|
||||||
-U ${DB_SERVER_ROOT_USER} -c "$query" 2>/dev/null);
|
-U ${DB_SERVER_ROOT_USER} -c "$query" $db 2>/dev/null);
|
||||||
|
|
||||||
unset PGPASSWORD
|
unset PGPASSWORD
|
||||||
|
|
||||||
@ -337,11 +339,11 @@ create_db_schema_postgresql() {
|
|||||||
local type=$1
|
local type=$1
|
||||||
|
|
||||||
DBVERSION_TABLE_EXISTS=$(psql_query "SELECT 1 FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid =
|
DBVERSION_TABLE_EXISTS=$(psql_query "SELECT 1 FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid =
|
||||||
c.relnamespace WHERE n.nspname = 'public' AND c.relname = 'dbversion'")
|
c.relnamespace WHERE n.nspname = 'public' AND c.relname = 'dbversion'" "${DB_SERVER_DBNAME}")
|
||||||
|
|
||||||
if [ -n "${DBVERSION_TABLE_EXISTS}" ]; then
|
if [ -n "${DBVERSION_TABLE_EXISTS}" ]; then
|
||||||
echo "** Table '${DB_SERVER_DBNAME}.dbversion' already exists."
|
echo "** Table '${DB_SERVER_DBNAME}.dbversion' already exists."
|
||||||
ZBX_DB_VERSION=$(psql_query "SELECT mandatory FROM ${DB_SERVER_DBNAME}.dbversion")
|
ZBX_DB_VERSION=$(psql_query "SELECT mandatory FROM public.dbversion" "${DB_SERVER_DBNAME}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${ZBX_DB_VERSION}" ]; then
|
if [ -z "${ZBX_DB_VERSION}" ]; then
|
||||||
|
@ -234,6 +234,8 @@ mysql_query() {
|
|||||||
|
|
||||||
psql_query() {
|
psql_query() {
|
||||||
query=$1
|
query=$1
|
||||||
|
db=$2
|
||||||
|
|
||||||
local result=""
|
local result=""
|
||||||
|
|
||||||
if [ -n "${DB_SERVER_ZBX_PASS}" ]; then
|
if [ -n "${DB_SERVER_ZBX_PASS}" ]; then
|
||||||
@ -241,7 +243,7 @@ psql_query() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
result=$(psql -A -q -t -h ${DB_SERVER_HOST} -p ${DB_SERVER_PORT} \
|
result=$(psql -A -q -t -h ${DB_SERVER_HOST} -p ${DB_SERVER_PORT} \
|
||||||
-U ${DB_SERVER_ROOT_USER} -c "$query" 2>/dev/null);
|
-U ${DB_SERVER_ROOT_USER} -c "$query" $db 2>/dev/null);
|
||||||
|
|
||||||
unset PGPASSWORD
|
unset PGPASSWORD
|
||||||
|
|
||||||
@ -337,11 +339,11 @@ create_db_schema_postgresql() {
|
|||||||
local type=$1
|
local type=$1
|
||||||
|
|
||||||
DBVERSION_TABLE_EXISTS=$(psql_query "SELECT 1 FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid =
|
DBVERSION_TABLE_EXISTS=$(psql_query "SELECT 1 FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid =
|
||||||
c.relnamespace WHERE n.nspname = 'public' AND c.relname = 'dbversion'")
|
c.relnamespace WHERE n.nspname = 'public' AND c.relname = 'dbversion'" "${DB_SERVER_DBNAME}")
|
||||||
|
|
||||||
if [ -n "${DBVERSION_TABLE_EXISTS}" ]; then
|
if [ -n "${DBVERSION_TABLE_EXISTS}" ]; then
|
||||||
echo "** Table '${DB_SERVER_DBNAME}.dbversion' already exists."
|
echo "** Table '${DB_SERVER_DBNAME}.dbversion' already exists."
|
||||||
ZBX_DB_VERSION=$(psql_query "SELECT mandatory FROM ${DB_SERVER_DBNAME}.dbversion")
|
ZBX_DB_VERSION=$(psql_query "SELECT mandatory FROM public.dbversion" "${DB_SERVER_DBNAME}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${ZBX_DB_VERSION}" ]; then
|
if [ -z "${ZBX_DB_VERSION}" ]; then
|
||||||
|
@ -234,6 +234,8 @@ mysql_query() {
|
|||||||
|
|
||||||
psql_query() {
|
psql_query() {
|
||||||
query=$1
|
query=$1
|
||||||
|
db=$2
|
||||||
|
|
||||||
local result=""
|
local result=""
|
||||||
|
|
||||||
if [ -n "${DB_SERVER_ZBX_PASS}" ]; then
|
if [ -n "${DB_SERVER_ZBX_PASS}" ]; then
|
||||||
@ -241,7 +243,7 @@ psql_query() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
result=$(psql -A -q -t -h ${DB_SERVER_HOST} -p ${DB_SERVER_PORT} \
|
result=$(psql -A -q -t -h ${DB_SERVER_HOST} -p ${DB_SERVER_PORT} \
|
||||||
-U ${DB_SERVER_ROOT_USER} -c "$query" 2>/dev/null);
|
-U ${DB_SERVER_ROOT_USER} -c "$query" $db 2>/dev/null);
|
||||||
|
|
||||||
unset PGPASSWORD
|
unset PGPASSWORD
|
||||||
|
|
||||||
@ -337,11 +339,11 @@ create_db_schema_postgresql() {
|
|||||||
local type=$1
|
local type=$1
|
||||||
|
|
||||||
DBVERSION_TABLE_EXISTS=$(psql_query "SELECT 1 FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid =
|
DBVERSION_TABLE_EXISTS=$(psql_query "SELECT 1 FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid =
|
||||||
c.relnamespace WHERE n.nspname = 'public' AND c.relname = 'dbversion'")
|
c.relnamespace WHERE n.nspname = 'public' AND c.relname = 'dbversion'" "${DB_SERVER_DBNAME}")
|
||||||
|
|
||||||
if [ -n "${DBVERSION_TABLE_EXISTS}" ]; then
|
if [ -n "${DBVERSION_TABLE_EXISTS}" ]; then
|
||||||
echo "** Table '${DB_SERVER_DBNAME}.dbversion' already exists."
|
echo "** Table '${DB_SERVER_DBNAME}.dbversion' already exists."
|
||||||
ZBX_DB_VERSION=$(psql_query "SELECT mandatory FROM ${DB_SERVER_DBNAME}.dbversion")
|
ZBX_DB_VERSION=$(psql_query "SELECT mandatory FROM public.dbversion" "${DB_SERVER_DBNAME}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${ZBX_DB_VERSION}" ]; then
|
if [ -z "${ZBX_DB_VERSION}" ]; then
|
||||||
|
@ -234,6 +234,8 @@ mysql_query() {
|
|||||||
|
|
||||||
psql_query() {
|
psql_query() {
|
||||||
query=$1
|
query=$1
|
||||||
|
db=$2
|
||||||
|
|
||||||
local result=""
|
local result=""
|
||||||
|
|
||||||
if [ -n "${DB_SERVER_ZBX_PASS}" ]; then
|
if [ -n "${DB_SERVER_ZBX_PASS}" ]; then
|
||||||
@ -241,7 +243,7 @@ psql_query() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
result=$(psql -A -q -t -h ${DB_SERVER_HOST} -p ${DB_SERVER_PORT} \
|
result=$(psql -A -q -t -h ${DB_SERVER_HOST} -p ${DB_SERVER_PORT} \
|
||||||
-U ${DB_SERVER_ROOT_USER} -c "$query" 2>/dev/null);
|
-U ${DB_SERVER_ROOT_USER} -c "$query" $db 2>/dev/null);
|
||||||
|
|
||||||
unset PGPASSWORD
|
unset PGPASSWORD
|
||||||
|
|
||||||
@ -337,11 +339,11 @@ create_db_schema_postgresql() {
|
|||||||
local type=$1
|
local type=$1
|
||||||
|
|
||||||
DBVERSION_TABLE_EXISTS=$(psql_query "SELECT 1 FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid =
|
DBVERSION_TABLE_EXISTS=$(psql_query "SELECT 1 FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid =
|
||||||
c.relnamespace WHERE n.nspname = 'public' AND c.relname = 'dbversion'")
|
c.relnamespace WHERE n.nspname = 'public' AND c.relname = 'dbversion'" "${DB_SERVER_DBNAME}")
|
||||||
|
|
||||||
if [ -n "${DBVERSION_TABLE_EXISTS}" ]; then
|
if [ -n "${DBVERSION_TABLE_EXISTS}" ]; then
|
||||||
echo "** Table '${DB_SERVER_DBNAME}.dbversion' already exists."
|
echo "** Table '${DB_SERVER_DBNAME}.dbversion' already exists."
|
||||||
ZBX_DB_VERSION=$(psql_query "SELECT mandatory FROM ${DB_SERVER_DBNAME}.dbversion")
|
ZBX_DB_VERSION=$(psql_query "SELECT mandatory FROM public.dbversion" "${DB_SERVER_DBNAME}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${ZBX_DB_VERSION}" ]; then
|
if [ -z "${ZBX_DB_VERSION}" ]; then
|
||||||
|
@ -234,6 +234,8 @@ mysql_query() {
|
|||||||
|
|
||||||
psql_query() {
|
psql_query() {
|
||||||
query=$1
|
query=$1
|
||||||
|
db=$2
|
||||||
|
|
||||||
local result=""
|
local result=""
|
||||||
|
|
||||||
if [ -n "${DB_SERVER_ZBX_PASS}" ]; then
|
if [ -n "${DB_SERVER_ZBX_PASS}" ]; then
|
||||||
@ -241,7 +243,7 @@ psql_query() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
result=$(psql -A -q -t -h ${DB_SERVER_HOST} -p ${DB_SERVER_PORT} \
|
result=$(psql -A -q -t -h ${DB_SERVER_HOST} -p ${DB_SERVER_PORT} \
|
||||||
-U ${DB_SERVER_ROOT_USER} -c "$query" 2>/dev/null);
|
-U ${DB_SERVER_ROOT_USER} -c "$query" $db 2>/dev/null);
|
||||||
|
|
||||||
unset PGPASSWORD
|
unset PGPASSWORD
|
||||||
|
|
||||||
@ -337,11 +339,11 @@ create_db_schema_postgresql() {
|
|||||||
local type=$1
|
local type=$1
|
||||||
|
|
||||||
DBVERSION_TABLE_EXISTS=$(psql_query "SELECT 1 FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid =
|
DBVERSION_TABLE_EXISTS=$(psql_query "SELECT 1 FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid =
|
||||||
c.relnamespace WHERE n.nspname = 'public' AND c.relname = 'dbversion'")
|
c.relnamespace WHERE n.nspname = 'public' AND c.relname = 'dbversion'" "${DB_SERVER_DBNAME}")
|
||||||
|
|
||||||
if [ -n "${DBVERSION_TABLE_EXISTS}" ]; then
|
if [ -n "${DBVERSION_TABLE_EXISTS}" ]; then
|
||||||
echo "** Table '${DB_SERVER_DBNAME}.dbversion' already exists."
|
echo "** Table '${DB_SERVER_DBNAME}.dbversion' already exists."
|
||||||
ZBX_DB_VERSION=$(psql_query "SELECT mandatory FROM ${DB_SERVER_DBNAME}.dbversion")
|
ZBX_DB_VERSION=$(psql_query "SELECT mandatory FROM public.dbversion" "${DB_SERVER_DBNAME}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${ZBX_DB_VERSION}" ]; then
|
if [ -z "${ZBX_DB_VERSION}" ]; then
|
||||||
|
@ -234,6 +234,8 @@ mysql_query() {
|
|||||||
|
|
||||||
psql_query() {
|
psql_query() {
|
||||||
query=$1
|
query=$1
|
||||||
|
db=$2
|
||||||
|
|
||||||
local result=""
|
local result=""
|
||||||
|
|
||||||
if [ -n "${DB_SERVER_ZBX_PASS}" ]; then
|
if [ -n "${DB_SERVER_ZBX_PASS}" ]; then
|
||||||
@ -241,7 +243,7 @@ psql_query() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
result=$(psql -A -q -t -h ${DB_SERVER_HOST} -p ${DB_SERVER_PORT} \
|
result=$(psql -A -q -t -h ${DB_SERVER_HOST} -p ${DB_SERVER_PORT} \
|
||||||
-U ${DB_SERVER_ROOT_USER} -c "$query" 2>/dev/null);
|
-U ${DB_SERVER_ROOT_USER} -c "$query" $db 2>/dev/null);
|
||||||
|
|
||||||
unset PGPASSWORD
|
unset PGPASSWORD
|
||||||
|
|
||||||
@ -337,11 +339,11 @@ create_db_schema_postgresql() {
|
|||||||
local type=$1
|
local type=$1
|
||||||
|
|
||||||
DBVERSION_TABLE_EXISTS=$(psql_query "SELECT 1 FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid =
|
DBVERSION_TABLE_EXISTS=$(psql_query "SELECT 1 FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid =
|
||||||
c.relnamespace WHERE n.nspname = 'public' AND c.relname = 'dbversion'")
|
c.relnamespace WHERE n.nspname = 'public' AND c.relname = 'dbversion'" "${DB_SERVER_DBNAME}")
|
||||||
|
|
||||||
if [ -n "${DBVERSION_TABLE_EXISTS}" ]; then
|
if [ -n "${DBVERSION_TABLE_EXISTS}" ]; then
|
||||||
echo "** Table '${DB_SERVER_DBNAME}.dbversion' already exists."
|
echo "** Table '${DB_SERVER_DBNAME}.dbversion' already exists."
|
||||||
ZBX_DB_VERSION=$(psql_query "SELECT mandatory FROM ${DB_SERVER_DBNAME}.dbversion")
|
ZBX_DB_VERSION=$(psql_query "SELECT mandatory FROM public.dbversion" "${DB_SERVER_DBNAME}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${ZBX_DB_VERSION}" ]; then
|
if [ -z "${ZBX_DB_VERSION}" ]; then
|
||||||
|
@ -234,6 +234,8 @@ mysql_query() {
|
|||||||
|
|
||||||
psql_query() {
|
psql_query() {
|
||||||
query=$1
|
query=$1
|
||||||
|
db=$2
|
||||||
|
|
||||||
local result=""
|
local result=""
|
||||||
|
|
||||||
if [ -n "${DB_SERVER_ZBX_PASS}" ]; then
|
if [ -n "${DB_SERVER_ZBX_PASS}" ]; then
|
||||||
@ -241,7 +243,7 @@ psql_query() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
result=$(psql -A -q -t -h ${DB_SERVER_HOST} -p ${DB_SERVER_PORT} \
|
result=$(psql -A -q -t -h ${DB_SERVER_HOST} -p ${DB_SERVER_PORT} \
|
||||||
-U ${DB_SERVER_ROOT_USER} -c "$query" 2>/dev/null);
|
-U ${DB_SERVER_ROOT_USER} -c "$query" $db 2>/dev/null);
|
||||||
|
|
||||||
unset PGPASSWORD
|
unset PGPASSWORD
|
||||||
|
|
||||||
@ -337,11 +339,11 @@ create_db_schema_postgresql() {
|
|||||||
local type=$1
|
local type=$1
|
||||||
|
|
||||||
DBVERSION_TABLE_EXISTS=$(psql_query "SELECT 1 FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid =
|
DBVERSION_TABLE_EXISTS=$(psql_query "SELECT 1 FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid =
|
||||||
c.relnamespace WHERE n.nspname = 'public' AND c.relname = 'dbversion'")
|
c.relnamespace WHERE n.nspname = 'public' AND c.relname = 'dbversion'" "${DB_SERVER_DBNAME}")
|
||||||
|
|
||||||
if [ -n "${DBVERSION_TABLE_EXISTS}" ]; then
|
if [ -n "${DBVERSION_TABLE_EXISTS}" ]; then
|
||||||
echo "** Table '${DB_SERVER_DBNAME}.dbversion' already exists."
|
echo "** Table '${DB_SERVER_DBNAME}.dbversion' already exists."
|
||||||
ZBX_DB_VERSION=$(psql_query "SELECT mandatory FROM ${DB_SERVER_DBNAME}.dbversion")
|
ZBX_DB_VERSION=$(psql_query "SELECT mandatory FROM public.dbversion" "${DB_SERVER_DBNAME}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${ZBX_DB_VERSION}" ]; then
|
if [ -z "${ZBX_DB_VERSION}" ]; then
|
||||||
|
@ -234,6 +234,8 @@ mysql_query() {
|
|||||||
|
|
||||||
psql_query() {
|
psql_query() {
|
||||||
query=$1
|
query=$1
|
||||||
|
db=$2
|
||||||
|
|
||||||
local result=""
|
local result=""
|
||||||
|
|
||||||
if [ -n "${DB_SERVER_ZBX_PASS}" ]; then
|
if [ -n "${DB_SERVER_ZBX_PASS}" ]; then
|
||||||
@ -241,7 +243,7 @@ psql_query() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
result=$(psql -A -q -t -h ${DB_SERVER_HOST} -p ${DB_SERVER_PORT} \
|
result=$(psql -A -q -t -h ${DB_SERVER_HOST} -p ${DB_SERVER_PORT} \
|
||||||
-U ${DB_SERVER_ROOT_USER} -c "$query" 2>/dev/null);
|
-U ${DB_SERVER_ROOT_USER} -c "$query" $db 2>/dev/null);
|
||||||
|
|
||||||
unset PGPASSWORD
|
unset PGPASSWORD
|
||||||
|
|
||||||
@ -337,11 +339,11 @@ create_db_schema_postgresql() {
|
|||||||
local type=$1
|
local type=$1
|
||||||
|
|
||||||
DBVERSION_TABLE_EXISTS=$(psql_query "SELECT 1 FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid =
|
DBVERSION_TABLE_EXISTS=$(psql_query "SELECT 1 FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid =
|
||||||
c.relnamespace WHERE n.nspname = 'public' AND c.relname = 'dbversion'")
|
c.relnamespace WHERE n.nspname = 'public' AND c.relname = 'dbversion'" "${DB_SERVER_DBNAME}")
|
||||||
|
|
||||||
if [ -n "${DBVERSION_TABLE_EXISTS}" ]; then
|
if [ -n "${DBVERSION_TABLE_EXISTS}" ]; then
|
||||||
echo "** Table '${DB_SERVER_DBNAME}.dbversion' already exists."
|
echo "** Table '${DB_SERVER_DBNAME}.dbversion' already exists."
|
||||||
ZBX_DB_VERSION=$(psql_query "SELECT mandatory FROM ${DB_SERVER_DBNAME}.dbversion")
|
ZBX_DB_VERSION=$(psql_query "SELECT mandatory FROM public.dbversion" "${DB_SERVER_DBNAME}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${ZBX_DB_VERSION}" ]; then
|
if [ -z "${ZBX_DB_VERSION}" ]; then
|
||||||
|
@ -234,6 +234,8 @@ mysql_query() {
|
|||||||
|
|
||||||
psql_query() {
|
psql_query() {
|
||||||
query=$1
|
query=$1
|
||||||
|
db=$2
|
||||||
|
|
||||||
local result=""
|
local result=""
|
||||||
|
|
||||||
if [ -n "${DB_SERVER_ZBX_PASS}" ]; then
|
if [ -n "${DB_SERVER_ZBX_PASS}" ]; then
|
||||||
@ -241,7 +243,7 @@ psql_query() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
result=$(psql -A -q -t -h ${DB_SERVER_HOST} -p ${DB_SERVER_PORT} \
|
result=$(psql -A -q -t -h ${DB_SERVER_HOST} -p ${DB_SERVER_PORT} \
|
||||||
-U ${DB_SERVER_ROOT_USER} -c "$query" 2>/dev/null);
|
-U ${DB_SERVER_ROOT_USER} -c "$query" $db 2>/dev/null);
|
||||||
|
|
||||||
unset PGPASSWORD
|
unset PGPASSWORD
|
||||||
|
|
||||||
@ -337,11 +339,11 @@ create_db_schema_postgresql() {
|
|||||||
local type=$1
|
local type=$1
|
||||||
|
|
||||||
DBVERSION_TABLE_EXISTS=$(psql_query "SELECT 1 FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid =
|
DBVERSION_TABLE_EXISTS=$(psql_query "SELECT 1 FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid =
|
||||||
c.relnamespace WHERE n.nspname = 'public' AND c.relname = 'dbversion'")
|
c.relnamespace WHERE n.nspname = 'public' AND c.relname = 'dbversion'" "${DB_SERVER_DBNAME}")
|
||||||
|
|
||||||
if [ -n "${DBVERSION_TABLE_EXISTS}" ]; then
|
if [ -n "${DBVERSION_TABLE_EXISTS}" ]; then
|
||||||
echo "** Table '${DB_SERVER_DBNAME}.dbversion' already exists."
|
echo "** Table '${DB_SERVER_DBNAME}.dbversion' already exists."
|
||||||
ZBX_DB_VERSION=$(psql_query "SELECT mandatory FROM ${DB_SERVER_DBNAME}.dbversion")
|
ZBX_DB_VERSION=$(psql_query "SELECT mandatory FROM public.dbversion" "${DB_SERVER_DBNAME}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${ZBX_DB_VERSION}" ]; then
|
if [ -z "${ZBX_DB_VERSION}" ]; then
|
||||||
|
@ -234,6 +234,8 @@ mysql_query() {
|
|||||||
|
|
||||||
psql_query() {
|
psql_query() {
|
||||||
query=$1
|
query=$1
|
||||||
|
db=$2
|
||||||
|
|
||||||
local result=""
|
local result=""
|
||||||
|
|
||||||
if [ -n "${DB_SERVER_ZBX_PASS}" ]; then
|
if [ -n "${DB_SERVER_ZBX_PASS}" ]; then
|
||||||
@ -241,7 +243,7 @@ psql_query() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
result=$(psql -A -q -t -h ${DB_SERVER_HOST} -p ${DB_SERVER_PORT} \
|
result=$(psql -A -q -t -h ${DB_SERVER_HOST} -p ${DB_SERVER_PORT} \
|
||||||
-U ${DB_SERVER_ROOT_USER} -c "$query" 2>/dev/null);
|
-U ${DB_SERVER_ROOT_USER} -c "$query" $db 2>/dev/null);
|
||||||
|
|
||||||
unset PGPASSWORD
|
unset PGPASSWORD
|
||||||
|
|
||||||
@ -337,11 +339,11 @@ create_db_schema_postgresql() {
|
|||||||
local type=$1
|
local type=$1
|
||||||
|
|
||||||
DBVERSION_TABLE_EXISTS=$(psql_query "SELECT 1 FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid =
|
DBVERSION_TABLE_EXISTS=$(psql_query "SELECT 1 FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid =
|
||||||
c.relnamespace WHERE n.nspname = 'public' AND c.relname = 'dbversion'")
|
c.relnamespace WHERE n.nspname = 'public' AND c.relname = 'dbversion'" "${DB_SERVER_DBNAME}")
|
||||||
|
|
||||||
if [ -n "${DBVERSION_TABLE_EXISTS}" ]; then
|
if [ -n "${DBVERSION_TABLE_EXISTS}" ]; then
|
||||||
echo "** Table '${DB_SERVER_DBNAME}.dbversion' already exists."
|
echo "** Table '${DB_SERVER_DBNAME}.dbversion' already exists."
|
||||||
ZBX_DB_VERSION=$(psql_query "SELECT mandatory FROM ${DB_SERVER_DBNAME}.dbversion")
|
ZBX_DB_VERSION=$(psql_query "SELECT mandatory FROM public.dbversion" "${DB_SERVER_DBNAME}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${ZBX_DB_VERSION}" ]; then
|
if [ -z "${ZBX_DB_VERSION}" ]; then
|
||||||
|
@ -234,6 +234,8 @@ mysql_query() {
|
|||||||
|
|
||||||
psql_query() {
|
psql_query() {
|
||||||
query=$1
|
query=$1
|
||||||
|
db=$2
|
||||||
|
|
||||||
local result=""
|
local result=""
|
||||||
|
|
||||||
if [ -n "${DB_SERVER_ZBX_PASS}" ]; then
|
if [ -n "${DB_SERVER_ZBX_PASS}" ]; then
|
||||||
@ -241,7 +243,7 @@ psql_query() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
result=$(psql -A -q -t -h ${DB_SERVER_HOST} -p ${DB_SERVER_PORT} \
|
result=$(psql -A -q -t -h ${DB_SERVER_HOST} -p ${DB_SERVER_PORT} \
|
||||||
-U ${DB_SERVER_ROOT_USER} -c "$query" 2>/dev/null);
|
-U ${DB_SERVER_ROOT_USER} -c "$query" $db 2>/dev/null);
|
||||||
|
|
||||||
unset PGPASSWORD
|
unset PGPASSWORD
|
||||||
|
|
||||||
@ -337,11 +339,11 @@ create_db_schema_postgresql() {
|
|||||||
local type=$1
|
local type=$1
|
||||||
|
|
||||||
DBVERSION_TABLE_EXISTS=$(psql_query "SELECT 1 FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid =
|
DBVERSION_TABLE_EXISTS=$(psql_query "SELECT 1 FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid =
|
||||||
c.relnamespace WHERE n.nspname = 'public' AND c.relname = 'dbversion'")
|
c.relnamespace WHERE n.nspname = 'public' AND c.relname = 'dbversion'" "${DB_SERVER_DBNAME}")
|
||||||
|
|
||||||
if [ -n "${DBVERSION_TABLE_EXISTS}" ]; then
|
if [ -n "${DBVERSION_TABLE_EXISTS}" ]; then
|
||||||
echo "** Table '${DB_SERVER_DBNAME}.dbversion' already exists."
|
echo "** Table '${DB_SERVER_DBNAME}.dbversion' already exists."
|
||||||
ZBX_DB_VERSION=$(psql_query "SELECT mandatory FROM ${DB_SERVER_DBNAME}.dbversion")
|
ZBX_DB_VERSION=$(psql_query "SELECT mandatory FROM public.dbversion" "${DB_SERVER_DBNAME}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${ZBX_DB_VERSION}" ]; then
|
if [ -z "${ZBX_DB_VERSION}" ]; then
|
||||||
|
@ -234,6 +234,8 @@ mysql_query() {
|
|||||||
|
|
||||||
psql_query() {
|
psql_query() {
|
||||||
query=$1
|
query=$1
|
||||||
|
db=$2
|
||||||
|
|
||||||
local result=""
|
local result=""
|
||||||
|
|
||||||
if [ -n "${DB_SERVER_ZBX_PASS}" ]; then
|
if [ -n "${DB_SERVER_ZBX_PASS}" ]; then
|
||||||
@ -241,7 +243,7 @@ psql_query() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
result=$(psql -A -q -t -h ${DB_SERVER_HOST} -p ${DB_SERVER_PORT} \
|
result=$(psql -A -q -t -h ${DB_SERVER_HOST} -p ${DB_SERVER_PORT} \
|
||||||
-U ${DB_SERVER_ROOT_USER} -c "$query" 2>/dev/null);
|
-U ${DB_SERVER_ROOT_USER} -c "$query" $db 2>/dev/null);
|
||||||
|
|
||||||
unset PGPASSWORD
|
unset PGPASSWORD
|
||||||
|
|
||||||
@ -337,11 +339,11 @@ create_db_schema_postgresql() {
|
|||||||
local type=$1
|
local type=$1
|
||||||
|
|
||||||
DBVERSION_TABLE_EXISTS=$(psql_query "SELECT 1 FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid =
|
DBVERSION_TABLE_EXISTS=$(psql_query "SELECT 1 FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid =
|
||||||
c.relnamespace WHERE n.nspname = 'public' AND c.relname = 'dbversion'")
|
c.relnamespace WHERE n.nspname = 'public' AND c.relname = 'dbversion'" "${DB_SERVER_DBNAME}")
|
||||||
|
|
||||||
if [ -n "${DBVERSION_TABLE_EXISTS}" ]; then
|
if [ -n "${DBVERSION_TABLE_EXISTS}" ]; then
|
||||||
echo "** Table '${DB_SERVER_DBNAME}.dbversion' already exists."
|
echo "** Table '${DB_SERVER_DBNAME}.dbversion' already exists."
|
||||||
ZBX_DB_VERSION=$(psql_query "SELECT mandatory FROM ${DB_SERVER_DBNAME}.dbversion")
|
ZBX_DB_VERSION=$(psql_query "SELECT mandatory FROM public.dbversion" "${DB_SERVER_DBNAME}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${ZBX_DB_VERSION}" ]; then
|
if [ -z "${ZBX_DB_VERSION}" ]; then
|
||||||
|
@ -234,6 +234,8 @@ mysql_query() {
|
|||||||
|
|
||||||
psql_query() {
|
psql_query() {
|
||||||
query=$1
|
query=$1
|
||||||
|
db=$2
|
||||||
|
|
||||||
local result=""
|
local result=""
|
||||||
|
|
||||||
if [ -n "${DB_SERVER_ZBX_PASS}" ]; then
|
if [ -n "${DB_SERVER_ZBX_PASS}" ]; then
|
||||||
@ -241,7 +243,7 @@ psql_query() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
result=$(psql -A -q -t -h ${DB_SERVER_HOST} -p ${DB_SERVER_PORT} \
|
result=$(psql -A -q -t -h ${DB_SERVER_HOST} -p ${DB_SERVER_PORT} \
|
||||||
-U ${DB_SERVER_ROOT_USER} -c "$query" 2>/dev/null);
|
-U ${DB_SERVER_ROOT_USER} -c "$query" $db 2>/dev/null);
|
||||||
|
|
||||||
unset PGPASSWORD
|
unset PGPASSWORD
|
||||||
|
|
||||||
@ -337,11 +339,11 @@ create_db_schema_postgresql() {
|
|||||||
local type=$1
|
local type=$1
|
||||||
|
|
||||||
DBVERSION_TABLE_EXISTS=$(psql_query "SELECT 1 FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid =
|
DBVERSION_TABLE_EXISTS=$(psql_query "SELECT 1 FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid =
|
||||||
c.relnamespace WHERE n.nspname = 'public' AND c.relname = 'dbversion'")
|
c.relnamespace WHERE n.nspname = 'public' AND c.relname = 'dbversion'" "${DB_SERVER_DBNAME}")
|
||||||
|
|
||||||
if [ -n "${DBVERSION_TABLE_EXISTS}" ]; then
|
if [ -n "${DBVERSION_TABLE_EXISTS}" ]; then
|
||||||
echo "** Table '${DB_SERVER_DBNAME}.dbversion' already exists."
|
echo "** Table '${DB_SERVER_DBNAME}.dbversion' already exists."
|
||||||
ZBX_DB_VERSION=$(psql_query "SELECT mandatory FROM ${DB_SERVER_DBNAME}.dbversion")
|
ZBX_DB_VERSION=$(psql_query "SELECT mandatory FROM public.dbversion" "${DB_SERVER_DBNAME}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${ZBX_DB_VERSION}" ]; then
|
if [ -z "${ZBX_DB_VERSION}" ]; then
|
||||||
|
@ -234,6 +234,8 @@ mysql_query() {
|
|||||||
|
|
||||||
psql_query() {
|
psql_query() {
|
||||||
query=$1
|
query=$1
|
||||||
|
db=$2
|
||||||
|
|
||||||
local result=""
|
local result=""
|
||||||
|
|
||||||
if [ -n "${DB_SERVER_ZBX_PASS}" ]; then
|
if [ -n "${DB_SERVER_ZBX_PASS}" ]; then
|
||||||
@ -241,7 +243,7 @@ psql_query() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
result=$(psql -A -q -t -h ${DB_SERVER_HOST} -p ${DB_SERVER_PORT} \
|
result=$(psql -A -q -t -h ${DB_SERVER_HOST} -p ${DB_SERVER_PORT} \
|
||||||
-U ${DB_SERVER_ROOT_USER} -c "$query" 2>/dev/null);
|
-U ${DB_SERVER_ROOT_USER} -c "$query" $db 2>/dev/null);
|
||||||
|
|
||||||
unset PGPASSWORD
|
unset PGPASSWORD
|
||||||
|
|
||||||
@ -337,11 +339,11 @@ create_db_schema_postgresql() {
|
|||||||
local type=$1
|
local type=$1
|
||||||
|
|
||||||
DBVERSION_TABLE_EXISTS=$(psql_query "SELECT 1 FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid =
|
DBVERSION_TABLE_EXISTS=$(psql_query "SELECT 1 FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid =
|
||||||
c.relnamespace WHERE n.nspname = 'public' AND c.relname = 'dbversion'")
|
c.relnamespace WHERE n.nspname = 'public' AND c.relname = 'dbversion'" "${DB_SERVER_DBNAME}")
|
||||||
|
|
||||||
if [ -n "${DBVERSION_TABLE_EXISTS}" ]; then
|
if [ -n "${DBVERSION_TABLE_EXISTS}" ]; then
|
||||||
echo "** Table '${DB_SERVER_DBNAME}.dbversion' already exists."
|
echo "** Table '${DB_SERVER_DBNAME}.dbversion' already exists."
|
||||||
ZBX_DB_VERSION=$(psql_query "SELECT mandatory FROM ${DB_SERVER_DBNAME}.dbversion")
|
ZBX_DB_VERSION=$(psql_query "SELECT mandatory FROM public.dbversion" "${DB_SERVER_DBNAME}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${ZBX_DB_VERSION}" ]; then
|
if [ -z "${ZBX_DB_VERSION}" ]; then
|
||||||
|
@ -234,6 +234,8 @@ mysql_query() {
|
|||||||
|
|
||||||
psql_query() {
|
psql_query() {
|
||||||
query=$1
|
query=$1
|
||||||
|
db=$2
|
||||||
|
|
||||||
local result=""
|
local result=""
|
||||||
|
|
||||||
if [ -n "${DB_SERVER_ZBX_PASS}" ]; then
|
if [ -n "${DB_SERVER_ZBX_PASS}" ]; then
|
||||||
@ -241,7 +243,7 @@ psql_query() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
result=$(psql -A -q -t -h ${DB_SERVER_HOST} -p ${DB_SERVER_PORT} \
|
result=$(psql -A -q -t -h ${DB_SERVER_HOST} -p ${DB_SERVER_PORT} \
|
||||||
-U ${DB_SERVER_ROOT_USER} -c "$query" 2>/dev/null);
|
-U ${DB_SERVER_ROOT_USER} -c "$query" $db 2>/dev/null);
|
||||||
|
|
||||||
unset PGPASSWORD
|
unset PGPASSWORD
|
||||||
|
|
||||||
@ -337,11 +339,11 @@ create_db_schema_postgresql() {
|
|||||||
local type=$1
|
local type=$1
|
||||||
|
|
||||||
DBVERSION_TABLE_EXISTS=$(psql_query "SELECT 1 FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid =
|
DBVERSION_TABLE_EXISTS=$(psql_query "SELECT 1 FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid =
|
||||||
c.relnamespace WHERE n.nspname = 'public' AND c.relname = 'dbversion'")
|
c.relnamespace WHERE n.nspname = 'public' AND c.relname = 'dbversion'" "${DB_SERVER_DBNAME}")
|
||||||
|
|
||||||
if [ -n "${DBVERSION_TABLE_EXISTS}" ]; then
|
if [ -n "${DBVERSION_TABLE_EXISTS}" ]; then
|
||||||
echo "** Table '${DB_SERVER_DBNAME}.dbversion' already exists."
|
echo "** Table '${DB_SERVER_DBNAME}.dbversion' already exists."
|
||||||
ZBX_DB_VERSION=$(psql_query "SELECT mandatory FROM ${DB_SERVER_DBNAME}.dbversion")
|
ZBX_DB_VERSION=$(psql_query "SELECT mandatory FROM public.dbversion" "${DB_SERVER_DBNAME}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${ZBX_DB_VERSION}" ]; then
|
if [ -z "${ZBX_DB_VERSION}" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user