mirror of
https://github.com/netdata/netdata.git
synced 2025-04-28 06:32:30 +00:00
Fix the default value of the home directory (#9711)
Change the default home to be VARLIB_DIR instead of CACHE_DIR so that it is consistent with the installation. Override the default with the HOME var if set in the environment.
This commit is contained in:
parent
b0bfec14e2
commit
cedb8707c8
2 changed files with 3 additions and 2 deletions
|
@ -11,7 +11,7 @@ char *netdata_configured_web_dir = WEB_DIR;
|
|||
char *netdata_configured_cache_dir = CACHE_DIR;
|
||||
char *netdata_configured_varlib_dir = VARLIB_DIR;
|
||||
char *netdata_configured_lock_dir = NULL;
|
||||
char *netdata_configured_home_dir = CACHE_DIR;
|
||||
char *netdata_configured_home_dir = VARLIB_DIR;
|
||||
char *netdata_configured_host_prefix = NULL;
|
||||
char *netdata_configured_timezone = NULL;
|
||||
int netdata_ready;
|
||||
|
|
|
@ -541,7 +541,8 @@ static void get_netdata_configured_variables() {
|
|||
netdata_configured_web_dir = config_get(CONFIG_SECTION_GLOBAL, "web files directory", netdata_configured_web_dir);
|
||||
netdata_configured_cache_dir = config_get(CONFIG_SECTION_GLOBAL, "cache directory", netdata_configured_cache_dir);
|
||||
netdata_configured_varlib_dir = config_get(CONFIG_SECTION_GLOBAL, "lib directory", netdata_configured_varlib_dir);
|
||||
netdata_configured_home_dir = config_get(CONFIG_SECTION_GLOBAL, "home directory", netdata_configured_home_dir);
|
||||
char *env_home=getenv("HOME");
|
||||
netdata_configured_home_dir = config_get(CONFIG_SECTION_GLOBAL, "home directory", env_home?env_home:netdata_configured_home_dir);
|
||||
|
||||
netdata_configured_lock_dir = initialize_lock_directory_path(netdata_configured_varlib_dir);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue