fix support of logfile
authorCharlie Root <root@gringotts.local>
Mon, 4 Apr 2016 16:51:30 +0000 (19:51 +0300)
committerCharlie Root <root@gringotts.local>
Mon, 4 Apr 2016 16:51:30 +0000 (19:51 +0300)
main.c

diff --git a/main.c b/main.c
index c5ff3a9..0fb4f1a 100644 (file)
--- a/main.c
+++ b/main.c
@@ -131,7 +131,7 @@ main(int argn, char* argv[]) {
                logfd;
 
        opterr = 0;
-       while((i=getopt(argn,argv,"dD:p:P:wh")) != EOF) {
+       while((i=getopt(argn,argv,"dD:l:p:P:wh")) != EOF) {
                switch(i) {
                        case 'd':
                                daemonize = true;
@@ -139,6 +139,9 @@ main(int argn, char* argv[]) {
                        case 'D':
                                dbdir = strdup(optarg);
                                break;
+                       case 'l':
+                               logfile = strdup(optarg);
+                               break;
                        case 'p':
                                pidfile = strdup(optarg);
                                break;