From cd52a48021543469616869a44474417c2ff0c45a Mon Sep 17 00:00:00 2001 From: Alexey Pustovalov Date: Fri, 26 Apr 2024 15:43:18 +0900 Subject: [PATCH] Fixed VAULT_CERT_FILE detection --- .../web-apache-mysql/alpine/conf/etc/zabbix/web/zabbix.conf.php | 2 +- .../web-apache-mysql/centos/conf/etc/zabbix/web/zabbix.conf.php | 2 +- .../web-apache-mysql/ol/conf/etc/zabbix/web/zabbix.conf.php | 2 +- .../web-apache-mysql/ubuntu/conf/etc/zabbix/web/zabbix.conf.php | 2 +- .../web-apache-pgsql/alpine/conf/etc/zabbix/web/zabbix.conf.php | 2 +- .../web-apache-pgsql/centos/conf/etc/zabbix/web/zabbix.conf.php | 2 +- .../web-apache-pgsql/ol/conf/etc/zabbix/web/zabbix.conf.php | 2 +- .../web-apache-pgsql/ubuntu/conf/etc/zabbix/web/zabbix.conf.php | 2 +- .../web-nginx-mysql/alpine/conf/etc/zabbix/web/zabbix.conf.php | 2 +- .../web-nginx-mysql/centos/conf/etc/zabbix/web/zabbix.conf.php | 2 +- .../web-nginx-mysql/ol/conf/etc/zabbix/web/zabbix.conf.php | 2 +- .../web-nginx-mysql/rhel/conf/etc/zabbix/web/zabbix.conf.php | 2 +- .../web-nginx-mysql/ubuntu/conf/etc/zabbix/web/zabbix.conf.php | 2 +- .../web-nginx-pgsql/alpine/conf/etc/zabbix/web/zabbix.conf.php | 2 +- .../web-nginx-pgsql/centos/conf/etc/zabbix/web/zabbix.conf.php | 2 +- .../web-nginx-pgsql/ol/conf/etc/zabbix/web/zabbix.conf.php | 2 +- .../web-nginx-pgsql/rhel/conf/etc/zabbix/web/zabbix.conf.php | 2 +- .../web-nginx-pgsql/ubuntu/conf/etc/zabbix/web/zabbix.conf.php | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Dockerfiles/web-apache-mysql/alpine/conf/etc/zabbix/web/zabbix.conf.php b/Dockerfiles/web-apache-mysql/alpine/conf/etc/zabbix/web/zabbix.conf.php index b63116535..02dcf3908 100644 --- a/Dockerfiles/web-apache-mysql/alpine/conf/etc/zabbix/web/zabbix.conf.php +++ b/Dockerfiles/web-apache-mysql/alpine/conf/etc/zabbix/web/zabbix.conf.php @@ -33,7 +33,7 @@ $DB['VAULT_DB_PATH'] = getenv('ZBX_VAULTDBPATH'); $DB['VAULT_TOKEN'] = getenv('VAULT_TOKEN'); if (file_exists('/etc/zabbix/web/certs/vault.crt')) { - $DB['VAULT_CERT_FILE'] = file_exists('/etc/zabbix/web/certs/vault.crt'); + $DB['VAULT_CERT_FILE'] = '/etc/zabbix/web/certs/vault.crt'; } elseif (file_exists(getenv('ZBX_VAULTCERTFILE'))) { $DB['VAULT_CERT_FILE'] = getenv('ZBX_VAULTCERTFILE'); diff --git a/Dockerfiles/web-apache-mysql/centos/conf/etc/zabbix/web/zabbix.conf.php b/Dockerfiles/web-apache-mysql/centos/conf/etc/zabbix/web/zabbix.conf.php index b63116535..02dcf3908 100644 --- a/Dockerfiles/web-apache-mysql/centos/conf/etc/zabbix/web/zabbix.conf.php +++ b/Dockerfiles/web-apache-mysql/centos/conf/etc/zabbix/web/zabbix.conf.php @@ -33,7 +33,7 @@ $DB['VAULT_DB_PATH'] = getenv('ZBX_VAULTDBPATH'); $DB['VAULT_TOKEN'] = getenv('VAULT_TOKEN'); if (file_exists('/etc/zabbix/web/certs/vault.crt')) { - $DB['VAULT_CERT_FILE'] = file_exists('/etc/zabbix/web/certs/vault.crt'); + $DB['VAULT_CERT_FILE'] = '/etc/zabbix/web/certs/vault.crt'; } elseif (file_exists(getenv('ZBX_VAULTCERTFILE'))) { $DB['VAULT_CERT_FILE'] = getenv('ZBX_VAULTCERTFILE'); diff --git a/Dockerfiles/web-apache-mysql/ol/conf/etc/zabbix/web/zabbix.conf.php b/Dockerfiles/web-apache-mysql/ol/conf/etc/zabbix/web/zabbix.conf.php index b63116535..02dcf3908 100644 --- a/Dockerfiles/web-apache-mysql/ol/conf/etc/zabbix/web/zabbix.conf.php +++ b/Dockerfiles/web-apache-mysql/ol/conf/etc/zabbix/web/zabbix.conf.php @@ -33,7 +33,7 @@ $DB['VAULT_DB_PATH'] = getenv('ZBX_VAULTDBPATH'); $DB['VAULT_TOKEN'] = getenv('VAULT_TOKEN'); if (file_exists('/etc/zabbix/web/certs/vault.crt')) { - $DB['VAULT_CERT_FILE'] = file_exists('/etc/zabbix/web/certs/vault.crt'); + $DB['VAULT_CERT_FILE'] = '/etc/zabbix/web/certs/vault.crt'; } elseif (file_exists(getenv('ZBX_VAULTCERTFILE'))) { $DB['VAULT_CERT_FILE'] = getenv('ZBX_VAULTCERTFILE'); diff --git a/Dockerfiles/web-apache-mysql/ubuntu/conf/etc/zabbix/web/zabbix.conf.php b/Dockerfiles/web-apache-mysql/ubuntu/conf/etc/zabbix/web/zabbix.conf.php index b63116535..02dcf3908 100644 --- a/Dockerfiles/web-apache-mysql/ubuntu/conf/etc/zabbix/web/zabbix.conf.php +++ b/Dockerfiles/web-apache-mysql/ubuntu/conf/etc/zabbix/web/zabbix.conf.php @@ -33,7 +33,7 @@ $DB['VAULT_DB_PATH'] = getenv('ZBX_VAULTDBPATH'); $DB['VAULT_TOKEN'] = getenv('VAULT_TOKEN'); if (file_exists('/etc/zabbix/web/certs/vault.crt')) { - $DB['VAULT_CERT_FILE'] = file_exists('/etc/zabbix/web/certs/vault.crt'); + $DB['VAULT_CERT_FILE'] = '/etc/zabbix/web/certs/vault.crt'; } elseif (file_exists(getenv('ZBX_VAULTCERTFILE'))) { $DB['VAULT_CERT_FILE'] = getenv('ZBX_VAULTCERTFILE'); diff --git a/Dockerfiles/web-apache-pgsql/alpine/conf/etc/zabbix/web/zabbix.conf.php b/Dockerfiles/web-apache-pgsql/alpine/conf/etc/zabbix/web/zabbix.conf.php index b63116535..02dcf3908 100644 --- a/Dockerfiles/web-apache-pgsql/alpine/conf/etc/zabbix/web/zabbix.conf.php +++ b/Dockerfiles/web-apache-pgsql/alpine/conf/etc/zabbix/web/zabbix.conf.php @@ -33,7 +33,7 @@ $DB['VAULT_DB_PATH'] = getenv('ZBX_VAULTDBPATH'); $DB['VAULT_TOKEN'] = getenv('VAULT_TOKEN'); if (file_exists('/etc/zabbix/web/certs/vault.crt')) { - $DB['VAULT_CERT_FILE'] = file_exists('/etc/zabbix/web/certs/vault.crt'); + $DB['VAULT_CERT_FILE'] = '/etc/zabbix/web/certs/vault.crt'; } elseif (file_exists(getenv('ZBX_VAULTCERTFILE'))) { $DB['VAULT_CERT_FILE'] = getenv('ZBX_VAULTCERTFILE'); diff --git a/Dockerfiles/web-apache-pgsql/centos/conf/etc/zabbix/web/zabbix.conf.php b/Dockerfiles/web-apache-pgsql/centos/conf/etc/zabbix/web/zabbix.conf.php index b63116535..02dcf3908 100644 --- a/Dockerfiles/web-apache-pgsql/centos/conf/etc/zabbix/web/zabbix.conf.php +++ b/Dockerfiles/web-apache-pgsql/centos/conf/etc/zabbix/web/zabbix.conf.php @@ -33,7 +33,7 @@ $DB['VAULT_DB_PATH'] = getenv('ZBX_VAULTDBPATH'); $DB['VAULT_TOKEN'] = getenv('VAULT_TOKEN'); if (file_exists('/etc/zabbix/web/certs/vault.crt')) { - $DB['VAULT_CERT_FILE'] = file_exists('/etc/zabbix/web/certs/vault.crt'); + $DB['VAULT_CERT_FILE'] = '/etc/zabbix/web/certs/vault.crt'; } elseif (file_exists(getenv('ZBX_VAULTCERTFILE'))) { $DB['VAULT_CERT_FILE'] = getenv('ZBX_VAULTCERTFILE'); diff --git a/Dockerfiles/web-apache-pgsql/ol/conf/etc/zabbix/web/zabbix.conf.php b/Dockerfiles/web-apache-pgsql/ol/conf/etc/zabbix/web/zabbix.conf.php index b63116535..02dcf3908 100644 --- a/Dockerfiles/web-apache-pgsql/ol/conf/etc/zabbix/web/zabbix.conf.php +++ b/Dockerfiles/web-apache-pgsql/ol/conf/etc/zabbix/web/zabbix.conf.php @@ -33,7 +33,7 @@ $DB['VAULT_DB_PATH'] = getenv('ZBX_VAULTDBPATH'); $DB['VAULT_TOKEN'] = getenv('VAULT_TOKEN'); if (file_exists('/etc/zabbix/web/certs/vault.crt')) { - $DB['VAULT_CERT_FILE'] = file_exists('/etc/zabbix/web/certs/vault.crt'); + $DB['VAULT_CERT_FILE'] = '/etc/zabbix/web/certs/vault.crt'; } elseif (file_exists(getenv('ZBX_VAULTCERTFILE'))) { $DB['VAULT_CERT_FILE'] = getenv('ZBX_VAULTCERTFILE'); diff --git a/Dockerfiles/web-apache-pgsql/ubuntu/conf/etc/zabbix/web/zabbix.conf.php b/Dockerfiles/web-apache-pgsql/ubuntu/conf/etc/zabbix/web/zabbix.conf.php index b63116535..02dcf3908 100644 --- a/Dockerfiles/web-apache-pgsql/ubuntu/conf/etc/zabbix/web/zabbix.conf.php +++ b/Dockerfiles/web-apache-pgsql/ubuntu/conf/etc/zabbix/web/zabbix.conf.php @@ -33,7 +33,7 @@ $DB['VAULT_DB_PATH'] = getenv('ZBX_VAULTDBPATH'); $DB['VAULT_TOKEN'] = getenv('VAULT_TOKEN'); if (file_exists('/etc/zabbix/web/certs/vault.crt')) { - $DB['VAULT_CERT_FILE'] = file_exists('/etc/zabbix/web/certs/vault.crt'); + $DB['VAULT_CERT_FILE'] = '/etc/zabbix/web/certs/vault.crt'; } elseif (file_exists(getenv('ZBX_VAULTCERTFILE'))) { $DB['VAULT_CERT_FILE'] = getenv('ZBX_VAULTCERTFILE'); diff --git a/Dockerfiles/web-nginx-mysql/alpine/conf/etc/zabbix/web/zabbix.conf.php b/Dockerfiles/web-nginx-mysql/alpine/conf/etc/zabbix/web/zabbix.conf.php index b63116535..02dcf3908 100644 --- a/Dockerfiles/web-nginx-mysql/alpine/conf/etc/zabbix/web/zabbix.conf.php +++ b/Dockerfiles/web-nginx-mysql/alpine/conf/etc/zabbix/web/zabbix.conf.php @@ -33,7 +33,7 @@ $DB['VAULT_DB_PATH'] = getenv('ZBX_VAULTDBPATH'); $DB['VAULT_TOKEN'] = getenv('VAULT_TOKEN'); if (file_exists('/etc/zabbix/web/certs/vault.crt')) { - $DB['VAULT_CERT_FILE'] = file_exists('/etc/zabbix/web/certs/vault.crt'); + $DB['VAULT_CERT_FILE'] = '/etc/zabbix/web/certs/vault.crt'; } elseif (file_exists(getenv('ZBX_VAULTCERTFILE'))) { $DB['VAULT_CERT_FILE'] = getenv('ZBX_VAULTCERTFILE'); diff --git a/Dockerfiles/web-nginx-mysql/centos/conf/etc/zabbix/web/zabbix.conf.php b/Dockerfiles/web-nginx-mysql/centos/conf/etc/zabbix/web/zabbix.conf.php index b63116535..02dcf3908 100644 --- a/Dockerfiles/web-nginx-mysql/centos/conf/etc/zabbix/web/zabbix.conf.php +++ b/Dockerfiles/web-nginx-mysql/centos/conf/etc/zabbix/web/zabbix.conf.php @@ -33,7 +33,7 @@ $DB['VAULT_DB_PATH'] = getenv('ZBX_VAULTDBPATH'); $DB['VAULT_TOKEN'] = getenv('VAULT_TOKEN'); if (file_exists('/etc/zabbix/web/certs/vault.crt')) { - $DB['VAULT_CERT_FILE'] = file_exists('/etc/zabbix/web/certs/vault.crt'); + $DB['VAULT_CERT_FILE'] = '/etc/zabbix/web/certs/vault.crt'; } elseif (file_exists(getenv('ZBX_VAULTCERTFILE'))) { $DB['VAULT_CERT_FILE'] = getenv('ZBX_VAULTCERTFILE'); diff --git a/Dockerfiles/web-nginx-mysql/ol/conf/etc/zabbix/web/zabbix.conf.php b/Dockerfiles/web-nginx-mysql/ol/conf/etc/zabbix/web/zabbix.conf.php index b63116535..02dcf3908 100644 --- a/Dockerfiles/web-nginx-mysql/ol/conf/etc/zabbix/web/zabbix.conf.php +++ b/Dockerfiles/web-nginx-mysql/ol/conf/etc/zabbix/web/zabbix.conf.php @@ -33,7 +33,7 @@ $DB['VAULT_DB_PATH'] = getenv('ZBX_VAULTDBPATH'); $DB['VAULT_TOKEN'] = getenv('VAULT_TOKEN'); if (file_exists('/etc/zabbix/web/certs/vault.crt')) { - $DB['VAULT_CERT_FILE'] = file_exists('/etc/zabbix/web/certs/vault.crt'); + $DB['VAULT_CERT_FILE'] = '/etc/zabbix/web/certs/vault.crt'; } elseif (file_exists(getenv('ZBX_VAULTCERTFILE'))) { $DB['VAULT_CERT_FILE'] = getenv('ZBX_VAULTCERTFILE'); diff --git a/Dockerfiles/web-nginx-mysql/rhel/conf/etc/zabbix/web/zabbix.conf.php b/Dockerfiles/web-nginx-mysql/rhel/conf/etc/zabbix/web/zabbix.conf.php index b63116535..02dcf3908 100644 --- a/Dockerfiles/web-nginx-mysql/rhel/conf/etc/zabbix/web/zabbix.conf.php +++ b/Dockerfiles/web-nginx-mysql/rhel/conf/etc/zabbix/web/zabbix.conf.php @@ -33,7 +33,7 @@ $DB['VAULT_DB_PATH'] = getenv('ZBX_VAULTDBPATH'); $DB['VAULT_TOKEN'] = getenv('VAULT_TOKEN'); if (file_exists('/etc/zabbix/web/certs/vault.crt')) { - $DB['VAULT_CERT_FILE'] = file_exists('/etc/zabbix/web/certs/vault.crt'); + $DB['VAULT_CERT_FILE'] = '/etc/zabbix/web/certs/vault.crt'; } elseif (file_exists(getenv('ZBX_VAULTCERTFILE'))) { $DB['VAULT_CERT_FILE'] = getenv('ZBX_VAULTCERTFILE'); diff --git a/Dockerfiles/web-nginx-mysql/ubuntu/conf/etc/zabbix/web/zabbix.conf.php b/Dockerfiles/web-nginx-mysql/ubuntu/conf/etc/zabbix/web/zabbix.conf.php index b63116535..02dcf3908 100644 --- a/Dockerfiles/web-nginx-mysql/ubuntu/conf/etc/zabbix/web/zabbix.conf.php +++ b/Dockerfiles/web-nginx-mysql/ubuntu/conf/etc/zabbix/web/zabbix.conf.php @@ -33,7 +33,7 @@ $DB['VAULT_DB_PATH'] = getenv('ZBX_VAULTDBPATH'); $DB['VAULT_TOKEN'] = getenv('VAULT_TOKEN'); if (file_exists('/etc/zabbix/web/certs/vault.crt')) { - $DB['VAULT_CERT_FILE'] = file_exists('/etc/zabbix/web/certs/vault.crt'); + $DB['VAULT_CERT_FILE'] = '/etc/zabbix/web/certs/vault.crt'; } elseif (file_exists(getenv('ZBX_VAULTCERTFILE'))) { $DB['VAULT_CERT_FILE'] = getenv('ZBX_VAULTCERTFILE'); diff --git a/Dockerfiles/web-nginx-pgsql/alpine/conf/etc/zabbix/web/zabbix.conf.php b/Dockerfiles/web-nginx-pgsql/alpine/conf/etc/zabbix/web/zabbix.conf.php index b63116535..02dcf3908 100644 --- a/Dockerfiles/web-nginx-pgsql/alpine/conf/etc/zabbix/web/zabbix.conf.php +++ b/Dockerfiles/web-nginx-pgsql/alpine/conf/etc/zabbix/web/zabbix.conf.php @@ -33,7 +33,7 @@ $DB['VAULT_DB_PATH'] = getenv('ZBX_VAULTDBPATH'); $DB['VAULT_TOKEN'] = getenv('VAULT_TOKEN'); if (file_exists('/etc/zabbix/web/certs/vault.crt')) { - $DB['VAULT_CERT_FILE'] = file_exists('/etc/zabbix/web/certs/vault.crt'); + $DB['VAULT_CERT_FILE'] = '/etc/zabbix/web/certs/vault.crt'; } elseif (file_exists(getenv('ZBX_VAULTCERTFILE'))) { $DB['VAULT_CERT_FILE'] = getenv('ZBX_VAULTCERTFILE'); diff --git a/Dockerfiles/web-nginx-pgsql/centos/conf/etc/zabbix/web/zabbix.conf.php b/Dockerfiles/web-nginx-pgsql/centos/conf/etc/zabbix/web/zabbix.conf.php index b63116535..02dcf3908 100644 --- a/Dockerfiles/web-nginx-pgsql/centos/conf/etc/zabbix/web/zabbix.conf.php +++ b/Dockerfiles/web-nginx-pgsql/centos/conf/etc/zabbix/web/zabbix.conf.php @@ -33,7 +33,7 @@ $DB['VAULT_DB_PATH'] = getenv('ZBX_VAULTDBPATH'); $DB['VAULT_TOKEN'] = getenv('VAULT_TOKEN'); if (file_exists('/etc/zabbix/web/certs/vault.crt')) { - $DB['VAULT_CERT_FILE'] = file_exists('/etc/zabbix/web/certs/vault.crt'); + $DB['VAULT_CERT_FILE'] = '/etc/zabbix/web/certs/vault.crt'; } elseif (file_exists(getenv('ZBX_VAULTCERTFILE'))) { $DB['VAULT_CERT_FILE'] = getenv('ZBX_VAULTCERTFILE'); diff --git a/Dockerfiles/web-nginx-pgsql/ol/conf/etc/zabbix/web/zabbix.conf.php b/Dockerfiles/web-nginx-pgsql/ol/conf/etc/zabbix/web/zabbix.conf.php index b63116535..02dcf3908 100644 --- a/Dockerfiles/web-nginx-pgsql/ol/conf/etc/zabbix/web/zabbix.conf.php +++ b/Dockerfiles/web-nginx-pgsql/ol/conf/etc/zabbix/web/zabbix.conf.php @@ -33,7 +33,7 @@ $DB['VAULT_DB_PATH'] = getenv('ZBX_VAULTDBPATH'); $DB['VAULT_TOKEN'] = getenv('VAULT_TOKEN'); if (file_exists('/etc/zabbix/web/certs/vault.crt')) { - $DB['VAULT_CERT_FILE'] = file_exists('/etc/zabbix/web/certs/vault.crt'); + $DB['VAULT_CERT_FILE'] = '/etc/zabbix/web/certs/vault.crt'; } elseif (file_exists(getenv('ZBX_VAULTCERTFILE'))) { $DB['VAULT_CERT_FILE'] = getenv('ZBX_VAULTCERTFILE'); diff --git a/Dockerfiles/web-nginx-pgsql/rhel/conf/etc/zabbix/web/zabbix.conf.php b/Dockerfiles/web-nginx-pgsql/rhel/conf/etc/zabbix/web/zabbix.conf.php index b63116535..02dcf3908 100644 --- a/Dockerfiles/web-nginx-pgsql/rhel/conf/etc/zabbix/web/zabbix.conf.php +++ b/Dockerfiles/web-nginx-pgsql/rhel/conf/etc/zabbix/web/zabbix.conf.php @@ -33,7 +33,7 @@ $DB['VAULT_DB_PATH'] = getenv('ZBX_VAULTDBPATH'); $DB['VAULT_TOKEN'] = getenv('VAULT_TOKEN'); if (file_exists('/etc/zabbix/web/certs/vault.crt')) { - $DB['VAULT_CERT_FILE'] = file_exists('/etc/zabbix/web/certs/vault.crt'); + $DB['VAULT_CERT_FILE'] = '/etc/zabbix/web/certs/vault.crt'; } elseif (file_exists(getenv('ZBX_VAULTCERTFILE'))) { $DB['VAULT_CERT_FILE'] = getenv('ZBX_VAULTCERTFILE'); diff --git a/Dockerfiles/web-nginx-pgsql/ubuntu/conf/etc/zabbix/web/zabbix.conf.php b/Dockerfiles/web-nginx-pgsql/ubuntu/conf/etc/zabbix/web/zabbix.conf.php index b63116535..02dcf3908 100644 --- a/Dockerfiles/web-nginx-pgsql/ubuntu/conf/etc/zabbix/web/zabbix.conf.php +++ b/Dockerfiles/web-nginx-pgsql/ubuntu/conf/etc/zabbix/web/zabbix.conf.php @@ -33,7 +33,7 @@ $DB['VAULT_DB_PATH'] = getenv('ZBX_VAULTDBPATH'); $DB['VAULT_TOKEN'] = getenv('VAULT_TOKEN'); if (file_exists('/etc/zabbix/web/certs/vault.crt')) { - $DB['VAULT_CERT_FILE'] = file_exists('/etc/zabbix/web/certs/vault.crt'); + $DB['VAULT_CERT_FILE'] = '/etc/zabbix/web/certs/vault.crt'; } elseif (file_exists(getenv('ZBX_VAULTCERTFILE'))) { $DB['VAULT_CERT_FILE'] = getenv('ZBX_VAULTCERTFILE');