aboutsummaryrefslogtreecommitdiff
path: root/src/comet.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/comet.c')
-rw-r--r--src/comet.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/comet.c b/src/comet.c
index 1b26bfb..be07826 100644
--- a/src/comet.c
+++ b/src/comet.c
@@ -66,7 +66,7 @@ int main(int argc, char **argv)
any_log_level_t log_level = ANY_LOG_DEBUG;
if (argc != 1 && !strcmp(argv[1], "--trace"))
- log_level = ANY_LOG_TRACE;
+ log_level = ANY_LOG_TRACE;
any_log_init(stdout, log_level);
@@ -81,11 +81,17 @@ int main(int argc, char **argv)
log_info("Reading config '%s'", config_path);
int errors = config_read(&config, config_file);
if (errors > 0) {
- log_error("Config file contained %d errors", errors);
+ log_error("Config file contained %d syntax errors", errors);
return EXIT_FAILURE;
}
}
+ int errors = config_validate(&config);
+ if (errors > 0) {
+ log_error("Config file contained %d errors", errors);
+ return EXIT_FAILURE;
+ }
+
signal(SIGINT, signal_quit);
signal(SIGTERM, signal_quit);