diff options
Diffstat (limited to 'pullreqd.c')
-rw-r--r-- | pullreqd.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -63,9 +63,6 @@ void init_daemon(int change_dir, char *path) { /* Close any open file descriptors. */ for (int i = sysconf(_SC_OPEN_MAX); i >= 0; close(i--)); - - /* Open the logfile. */ - openlog("pullreqd", LOG_PID, LOG_DAEMON); } int init_config(char *config_file, config **cfg) { @@ -199,7 +196,12 @@ int main(int argc, char **argv) { int listen_socket = -1; int exit_status = EXIT_FAILURE; + /* Start it in daemon mode. */ init_daemon(1, "/"); + + /* Open the logfile. */ + openlog("pullreqd", LOG_PID, LOG_DAEMON); + log(LOG_NOTICE, "pullreqd started."); /* Read the config file. */ |