summaryrefslogtreecommitdiff
path: root/pullreqd.c
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2021-06-08 20:00:51 -0400
committermrb0nk500 <b0nk@b0nk.xyz>2021-06-08 20:00:51 -0400
commitb21be68d33290109153f21dc71d35ff2ec872445 (patch)
tree48832f440dadbf6e11a1c23d8c2f9c1ae6966503 /pullreqd.c
parent0449bc82bec13a5f9e9ea237e360993723c4b502 (diff)
Added the config file initialization code.
Diffstat (limited to 'pullreqd.c')
-rw-r--r--pullreqd.c11
1 files changed, 11 insertions, 0 deletions
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();