diff options
Diffstat (limited to 'lib/parse_ini.h')
-rw-r--r-- | lib/parse_ini.h | 39 |
1 files changed, 36 insertions, 3 deletions
diff --git a/lib/parse_ini.h b/lib/parse_ini.h index fea745c5..61149a21 100644 --- a/lib/parse_ini.h +++ b/lib/parse_ini.h | |||
@@ -13,10 +13,43 @@ typedef struct np_arg_el { | |||
13 | struct np_arg_el *next; | 13 | struct np_arg_el *next; |
14 | } np_arg_list; | 14 | } np_arg_list; |
15 | 15 | ||
16 | /* NP_DEFAULT_INI_PATH: compile-time default location for ini file */ | 16 | /* NP_DEFAULT_INI_PATH: compile-time default location for ini file |
17 | #ifndef NP_DEFAULT_INI_PATH | 17 | #ifndef NP_DEFAULT_INI_PATH |
18 | # define NP_DEFAULT_INI_PATH "/etc/nagios-plugins/plugins.ini" | 18 | # define NP_DEFAULT_INI_PATH "/etc/nagios-plugins.ini" |
19 | #endif /* NP_DEFAULT_INI_PATH */ | 19 | #endif NP_DEFAULT_INI_PATH */ |
20 | |||
21 | /* Filenames (see below) */ | ||
22 | #ifndef NP_DEFAULT_INI_FILENAME1 | ||
23 | # define NP_DEFAULT_INI_FILENAME1 "plugins.ini" | ||
24 | #endif /* NP_DEFAULT_INI_FILENAME1 */ | ||
25 | #ifndef NP_DEFAULT_INI_FILENAME2 | ||
26 | # define NP_DEFAULT_INI_FILENAME2 "nagios-plugins.ini" | ||
27 | #endif /* NP_DEFAULT_INI_FILENAME2 */ | ||
28 | |||
29 | /* Config paths ending in nagios (search for NP_DEFAULT_INI_FILENAME1) */ | ||
30 | #ifndef NP_DEFAULT_INI_NAGIOS_PATH1 | ||
31 | # define NP_DEFAULT_INI_NAGIOS_PATH1 "/etc/nagios" | ||
32 | #endif /* NP_DEFAULT_INI_NAGIOS_PATH1 */ | ||
33 | #ifndef NP_DEFAULT_INI_NAGIOS_PATH2 | ||
34 | # define NP_DEFAULT_INI_NAGIOS_PATH2 "/usr/local/nagios/etc" | ||
35 | #endif /* NP_DEFAULT_INI_NAGIOS_PATH2 */ | ||
36 | #ifndef NP_DEFAULT_INI_NAGIOS_PATH3 | ||
37 | # define NP_DEFAULT_INI_NAGIOS_PATH3 "/usr/local/etc/nagios" | ||
38 | #endif /* NP_DEFAULT_INI_NAGIOS_PATH3 */ | ||
39 | #ifndef NP_DEFAULT_INI_NAGIOS_PATH4 | ||
40 | # define NP_DEFAULT_INI_NAGIOS_PATH4 "/etc/opt/nagios" | ||
41 | #endif /* NP_DEFAULT_INI_NAGIOS_PATH4 */ | ||
42 | |||
43 | /* Config paths not ending in nagios (search for NP_DEFAULT_INI_FILENAME2) */ | ||
44 | #ifndef NP_DEFAULT_INI_PATH1 | ||
45 | # define NP_DEFAULT_INI_PATH1 "/etc" | ||
46 | #endif /* NP_DEFAULT_INI_PATH1 */ | ||
47 | #ifndef NP_DEFAULT_INI_PATH2 | ||
48 | # define NP_DEFAULT_INI_PATH2 "/usr/local/etc" | ||
49 | #endif /* NP_DEFAULT_INI_PATH2 */ | ||
50 | #ifndef NP_DEFAULT_INI_PATH3 | ||
51 | # define NP_DEFAULT_INI_PATH3 "/etc/opt" | ||
52 | #endif /* NP_DEFAULT_INI_PATH3 */ | ||
20 | 53 | ||
21 | /* np_load_defaults: load the default configuration (if present) for | 54 | /* np_load_defaults: load the default configuration (if present) for |
22 | * a plugin from the ini file | 55 | * a plugin from the ini file |