Note to self: Test code before committing...
[doldaconnect.git] / daemon / main.c
index 299fd0d..1670c5e 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,11 +424,15 @@ int main(int argc, char **argv)
        case 'n':
            nofork = 1;
            break;
+       case 's':
+           logtosyslog = 1;
+           logtostderr = 0;
+           break;
        case 'h':
        case ':':
        case '?':
        default:
-           printf("usage: doldacond [-hn] [-C configfile] [-p pidfile] [-f facility]\n");
+           printf("usage: doldacond [-hns] [-C configfile] [-p pidfile] [-f facility]\n");
            exit(c != 'h');
        }
     }