From b21be68d33290109153f21dc71d35ff2ec872445 Mon Sep 17 00:00:00 2001 From: mrb0nk500 Date: Tue, 8 Jun 2021 20:00:51 -0400 Subject: Added the config file initialization code. --- pullreqd.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'pullreqd.c') diff --git a/pullreqd.c b/pullreqd.c index 2df8809..95d131a 100644 --- a/pullreqd.c +++ b/pullreqd.c @@ -79,12 +79,23 @@ int init_config(char *config_file, config **cfg) { } int main(int argc, char **argv) { + config *cfg; + char *config_file = "test.conf"; int done = 0; + int config_read = 0; + init_daemon(1, "/"); syslog(LOG_NOTICE, "pullreqd started."); + + /* Read the config file. */ + config_read = init_config(config_file, &cfg); + /* Immediatly exit, if we failed to read the config file. */ + done = !config_read; + for (; !done;) { break; } + syslog(LOG_NOTICE, "pullreqd stopped."); closelog(); -- cgit v1.2.3-13-gbd6f