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
: ${ENABLE_TIMESCALEDB:="false"}
# 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"
@@ -379,14 +375,14 @@ create_db_schema_postgresql() {
exec_sql_file "/usr/share/doc/zabbix-server-postgresql/timescaledb.sql"
fi
apply_db_scripts "/var/lib/zabbix/dbscripts/*.sql"
apply_db_scripts "${ZABBIX_USER_HOME_DIR}/dbscripts/*.sql"
fi
}
update_zbx_config() {
echo "** Preparing Zabbix server configuration file"
ZBX_CONFIG=$ZABBIX_ETC_DIR/zabbix_server.conf
ZBX_CONFIG=$ZABBIX_CONF_DIR/zabbix_server.conf
update_config_var $ZBX_CONFIG "ListenIP" "${ZBX_LISTENIP}"
update_config_var $ZBX_CONFIG "ListenPort" "${ZBX_LISTENPORT}"