Using env variables for zabbix user home and configuration files directory

This commit is contained in:
Alexey Pustovalov
2024-12-24 17:42:58 +09:00
parent 26fc12add7
commit 4c65c37f27
122 changed files with 1200 additions and 1299 deletions

View File

@ -13,10 +13,6 @@ fi
: ${ZBX_SERVER_HOST:="zabbix-server"}
# Default directories
# User 'zabbix' home directory
ZABBIX_USER_HOME_DIR="/var/lib/zabbix"
# Configuration files directory
ZABBIX_ETC_DIR="/etc/zabbix"
# Internal directory for TLS related files, used when TLS*File specified as plain text values
ZABBIX_INTERNAL_ENC_DIR="${ZABBIX_USER_HOME_DIR}/enc_internal"
@ -349,7 +345,7 @@ create_db_schema_mysql() {
update_zbx_config() {
echo "** Preparing Zabbix proxy configuration file"
ZBX_CONFIG=$ZABBIX_ETC_DIR/zabbix_proxy.conf
ZBX_CONFIG=${ZABBIX_CONF_DIR}/zabbix_proxy.conf
update_config_var $ZBX_CONFIG "ProxyMode" "${ZBX_PROXYMODE}"
update_config_var $ZBX_CONFIG "Server" "${ZBX_SERVER_HOST}"
@ -469,7 +465,6 @@ update_zbx_config() {
update_config_var $ZBX_CONFIG "UnavailableDelay" "${ZBX_UNAVAILABLEDELAY}"
update_config_var $ZBX_CONFIG "UnreachableDelay" "${ZBX_UNREACHABLEDELAY}"
update_config_var $ZBX_CONFIG "AlertScriptsPath" "/usr/lib/zabbix/alertscripts"
update_config_var $ZBX_CONFIG "ExternalScripts" "/usr/lib/zabbix/externalscripts"
update_config_var $ZBX_CONFIG "FpingLocation" "${ZBX_FPINGLOCATION}"