mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-02-20 00:10:09 -05:00
lib/parse_ini.c: Read $MP_CONFIG_FILE
Read $MP_CONFIG_FILE if that variable is set in the environment.
This commit is contained in:
parent
f94e95785c
commit
fbe13d8f32
1 changed files with 2 additions and 1 deletions
|
|
@ -339,7 +339,8 @@ static char *default_file_in_path(void){
|
|||
static char *default_file(void){
|
||||
char **p, *ini_file;
|
||||
|
||||
if((ini_file=default_file_in_path())!=NULL)
|
||||
if((ini_file=getenv("MP_CONFIG_FILE"))!=NULL ||
|
||||
(ini_file=default_file_in_path())!=NULL)
|
||||
return ini_file;
|
||||
for(p=default_ini_path_names; *p!=NULL; p++)
|
||||
if (access(*p, F_OK)==0)
|
||||
|
|
|
|||
Loading…
Reference in a new issue