mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2025-08-09 00:24:58 +02:00
Clear ZBX, DB env variables before starting agent, server, proxy and web-service
This commit is contained in:
@ -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
|
||||
}
|
||||
|
||||
#################################################
|
||||
|
Reference in New Issue
Block a user