Skip to content

Commit

Permalink
Fixed secrets reading from ENV for Zabbix agent2 and proxy (sqlite3)
Browse files Browse the repository at this point in the history
  • Loading branch information
dotneft committed Jan 13, 2025
1 parent 91925d0 commit 9f16733
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 20 deletions.
7 changes: 3 additions & 4 deletions Dockerfiles/agent2/alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
7 changes: 3 additions & 4 deletions Dockerfiles/agent2/centos/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
7 changes: 3 additions & 4 deletions Dockerfiles/agent2/rhel/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
7 changes: 3 additions & 4 deletions Dockerfiles/agent2/ubuntu/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
7 changes: 3 additions & 4 deletions Dockerfiles/proxy-sqlite3/ubuntu/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 9f16733

Please sign in to comment.