From: fredrik Date: Thu, 26 Jan 2006 02:00:00 +0000 (+0000) Subject: Add -s option to log directly to syslog. X-Git-Tag: 0.1~55 X-Git-Url: http://git.dolda2000.com/gitweb/?p=doldaconnect.git;a=commitdiff_plain;h=9a0b3ef87823b01821ecaf541a486b1cd107ba8f 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 --- 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 '?':