From 9f16733f542092f09a7642e2d93baac09b85d4d7 Mon Sep 17 00:00:00 2001 From: Alexey Pustovalov Date: Mon, 13 Jan 2025 19:27:23 +0900 Subject: [PATCH] Fixed secrets reading from ENV for Zabbix agent2 and proxy (sqlite3) --- Dockerfiles/agent2/alpine/docker-entrypoint.sh | 7 +++---- Dockerfiles/agent2/centos/docker-entrypoint.sh | 7 +++---- Dockerfiles/agent2/rhel/docker-entrypoint.sh | 7 +++---- Dockerfiles/agent2/ubuntu/docker-entrypoint.sh | 7 +++---- Dockerfiles/proxy-sqlite3/ubuntu/docker-entrypoint.sh | 7 +++---- 5 files changed, 15 insertions(+), 20 deletions(-) diff --git a/Dockerfiles/agent2/alpine/docker-entrypoint.sh b/Dockerfiles/agent2/alpine/docker-entrypoint.sh index 958acbcc0..3c81f260f 100755 --- a/Dockerfiles/agent2/alpine/docker-entrypoint.sh +++ b/Dockerfiles/agent2/alpine/docker-entrypoint.sh @@ -117,10 +117,9 @@ update_config_multiple_var() { } file_process_from_env() { - local config_path=$1 - local var_name=$2 - local file_name=$3 - local var_value=$4 + local var_name=$1 + local file_name=$2 + local var_value=$3 if [ ! -z "$var_value" ]; then echo -n "$var_value" > "${ZABBIX_INTERNAL_ENC_DIR}/$var_name" diff --git a/Dockerfiles/agent2/centos/docker-entrypoint.sh b/Dockerfiles/agent2/centos/docker-entrypoint.sh index 958acbcc0..3c81f260f 100755 --- a/Dockerfiles/agent2/centos/docker-entrypoint.sh +++ b/Dockerfiles/agent2/centos/docker-entrypoint.sh @@ -117,10 +117,9 @@ update_config_multiple_var() { } file_process_from_env() { - local config_path=$1 - local var_name=$2 - local file_name=$3 - local var_value=$4 + local var_name=$1 + local file_name=$2 + local var_value=$3 if [ ! -z "$var_value" ]; then echo -n "$var_value" > "${ZABBIX_INTERNAL_ENC_DIR}/$var_name" diff --git a/Dockerfiles/agent2/rhel/docker-entrypoint.sh b/Dockerfiles/agent2/rhel/docker-entrypoint.sh index 958acbcc0..3c81f260f 100755 --- a/Dockerfiles/agent2/rhel/docker-entrypoint.sh +++ b/Dockerfiles/agent2/rhel/docker-entrypoint.sh @@ -117,10 +117,9 @@ update_config_multiple_var() { } file_process_from_env() { - local config_path=$1 - local var_name=$2 - local file_name=$3 - local var_value=$4 + local var_name=$1 + local file_name=$2 + local var_value=$3 if [ ! -z "$var_value" ]; then echo -n "$var_value" > "${ZABBIX_INTERNAL_ENC_DIR}/$var_name" diff --git a/Dockerfiles/agent2/ubuntu/docker-entrypoint.sh b/Dockerfiles/agent2/ubuntu/docker-entrypoint.sh index 958acbcc0..3c81f260f 100755 --- a/Dockerfiles/agent2/ubuntu/docker-entrypoint.sh +++ b/Dockerfiles/agent2/ubuntu/docker-entrypoint.sh @@ -117,10 +117,9 @@ update_config_multiple_var() { } file_process_from_env() { - local config_path=$1 - local var_name=$2 - local file_name=$3 - local var_value=$4 + local var_name=$1 + local file_name=$2 + local var_value=$3 if [ ! -z "$var_value" ]; then echo -n "$var_value" > "${ZABBIX_INTERNAL_ENC_DIR}/$var_name" diff --git a/Dockerfiles/proxy-sqlite3/ubuntu/docker-entrypoint.sh b/Dockerfiles/proxy-sqlite3/ubuntu/docker-entrypoint.sh index ff96f708f..aa130bd52 100755 --- a/Dockerfiles/proxy-sqlite3/ubuntu/docker-entrypoint.sh +++ b/Dockerfiles/proxy-sqlite3/ubuntu/docker-entrypoint.sh @@ -108,10 +108,9 @@ update_config_multiple_var() { } file_process_from_env() { - local config_path=$1 - local var_name=$2 - local file_name=$3 - local var_value=$4 + local var_name=$1 + local file_name=$2 + local var_value=$3 if [ ! -z "$var_value" ]; then echo -n "$var_value" > "${ZABBIX_INTERNAL_ENC_DIR}/$var_name"