Clear ZBX, DB env variables before starting agent, server, proxy and web-service

This commit is contained in:
Alexey Pustovalov
2024-08-20 18:09:56 +09:00
parent 98381f76d6
commit 4537b8edab
29 changed files with 261 additions and 0 deletions

View File

@ -249,10 +249,19 @@ update_zbx_config() {
fi
}
clear_zbx_env() {
[[ "${ZBX_CLEAR_ENV}" == "false" ]] && return
for env_var in $(env | grep -E "^ZBX_"); do
unset "${env_var%%=*}"
done
}
prepare_proxy() {
echo "Preparing Zabbix proxy"
update_zbx_config
clear_zbx_env
}
#################################################