diff options
Diffstat (limited to 'Source/charon/daemon.c')
-rw-r--r-- | Source/charon/daemon.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/charon/daemon.c b/Source/charon/daemon.c index d7265531d..376a09979 100644 --- a/Source/charon/daemon.c +++ b/Source/charon/daemon.c @@ -27,6 +27,7 @@ #include <sys/types.h> #include <unistd.h> #include <execinfo.h> +#include <string.h> #include "daemon.h" @@ -332,6 +333,16 @@ int main(int argc, char *argv[]) private_daemon_t *private_charon; FILE *pid_file; struct stat stb; + int i; + + /* trivial argument parsing */ + for (i = 1; i < argc; i++) + { + if (strcmp(argv[i], "--use-syslog") == 0) + { + logger_manager->set_output(logger_manager, ALL_LOGGERS, NULL); + } + } private_charon = daemon_create(); charon = (daemon_t*)private_charon; |