diff options
author | mrb0nk500 <b0nk@b0nk.xyz> | 2021-06-08 20:00:51 -0400 |
---|---|---|
committer | mrb0nk500 <b0nk@b0nk.xyz> | 2021-06-08 20:00:51 -0400 |
commit | b21be68d33290109153f21dc71d35ff2ec872445 (patch) | |
tree | 48832f440dadbf6e11a1c23d8c2f9c1ae6966503 /pullreqd.c | |
parent | 0449bc82bec13a5f9e9ea237e360993723c4b502 (diff) |
Added the config file initialization code.
Diffstat (limited to 'pullreqd.c')
-rw-r--r-- | pullreqd.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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(); |