Add -s option to log directly to syslog.
authorfredrik <fredrik@959494ce-11ee-0310-bf91-de5d638817bd>
Thu, 26 Jan 2006 02:00:00 +0000 (02:00 +0000)
committerfredrik <fredrik@959494ce-11ee-0310-bf91-de5d638817bd>
Thu, 26 Jan 2006 02:00:00 +0000 (02:00 +0000)
git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/doldaconnect@576 959494ce-11ee-0310-bf91-de5d638817bd

daemon/main.c

index 299fd0d..8a287a0 100644 (file)
@@ -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 '?':