diff options
-rw-r--r-- | src/common/conf/config-parser.c | 7 | ||||
-rw-r--r-- | src/common/conf/config-parser.h | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/common/conf/config-parser.c b/src/common/conf/config-parser.c index ab841391..07c71dcb 100644 --- a/src/common/conf/config-parser.c +++ b/src/common/conf/config-parser.c @@ -1220,8 +1220,11 @@ void resourced_parse_vendor_configs(void) fixed_app_and_service_list_init(); - /* Load configurations in limiter.conf and limiter.conf.d/ */ - config_parse(LIMITER_CONF_FILE, limiter_config, NULL); + if (access(LIMITER_CONF_DIR_LIMITER_CONF, F_OK) != 0) + config_parse(LIMITER_CONF_FILE, limiter_config, NULL); + else + config_parse(LIMITER_CONF_DIR_LIMITER_CONF, limiter_config, NULL); + config_type = LIMITER_CONFIG; load_per_vendor_configs(LIMITER_CONF_DIR, vendor_config, &config_type); diff --git a/src/common/conf/config-parser.h b/src/common/conf/config-parser.h index f7c32490..6e2533f6 100644 --- a/src/common/conf/config-parser.h +++ b/src/common/conf/config-parser.h @@ -30,6 +30,8 @@ extern "C" { #define CONF_FILE_SUFFIX ".conf" +#define LIMITER_CONF_DIR_LIMITER_CONF LIMITER_CONF_DIR "/limiter.conf" + #define LIMITER_CONF_FILE RD_CONFIG_FILE(limiter) #define OPTIMIZER_CONF_FILE RD_CONFIG_FILE(optimizer) #define PROCESS_CONF_FILE RD_CONFIG_FILE(process) |