From 9a0b3ef87823b01821ecaf541a486b1cd107ba8f Mon Sep 17 00:00:00 2001 From: fredrik Date: Thu, 26 Jan 2006 02:00:00 +0000 Subject: [PATCH] Add -s option to log directly to syslog. git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/doldaconnect@576 959494ce-11ee-0310-bf91-de5d638817bd --- daemon/main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/daemon/main.c b/daemon/main.c index 299fd0d..8a287a0 100644 --- a/daemon/main.c +++ b/daemon/main.c @@ -381,7 +381,7 @@ int main(int argc, char **argv) syslogfac = LOG_DAEMON; configfile = NULL; pidfile = NULL; - while((c = getopt(argc, argv, "p:C:f:hn")) != -1) + while((c = getopt(argc, argv, "p:C:f:hns")) != -1) { switch(c) { @@ -424,6 +424,9 @@ int main(int argc, char **argv) case 'n': nofork = 1; break; + case 's': + logtosyslog = 1; + logtostderr = 0; case 'h': case ':': case '?': -- 2.11.0