]> granicus.if.org Git - pdns/commitdiff
dnsdist: no flags for --daemonize
authorPieter Lexis <pieter.lexis@powerdns.com>
Thu, 16 Apr 2015 07:09:28 +0000 (09:09 +0200)
committerPieter Lexis <pieter.lexis@powerdns.com>
Wed, 22 Apr 2015 13:42:39 +0000 (15:42 +0200)
pdns/dnsdist.cc

index d21d5f0d5ef926df2a0b37c47b75dc1b0e42d295..8c20d8481c1d0c4591e1d350b728eb1a1ad4a819 100644 (file)
@@ -857,13 +857,13 @@ try
     {"execute", required_argument, 0, 'e'},
     {"command", optional_argument, 0, 'c'},
     {"local",  required_argument, 0, 'l'},
-    {"daemon", optional_argument, 0, 'd'},
+    {"daemon", 0, 0, 'd'},
     {"help", 0, 0, 'h'}, 
     {0,0,0,0} 
   };
   int longindex=0;
   for(;;) {
-    int c=getopt_long(argc, argv, "hbce:C:d:l:m:v", longopts, &longindex);
+    int c=getopt_long(argc, argv, "hbcde:C:l:m:v", longopts, &longindex);
     if(c==-1)
       break;
     switch(c) {
@@ -874,21 +874,18 @@ try
       g_cmdLine.beClient=true;
       break;
     case 'd':
-      if(!optarg)
-       g_cmdLine.beDaemon=true;
-      else
-       g_cmdLine.beDaemon=(string(optarg)=="true");
+      g_cmdLine.beDaemon=true;
       break;
     case 'e':
       g_cmdLine.command=optarg;
       break;
     case 'h':
-      cout<<"Syntax: dnsdist [-C,--config file] [-c,--client] [-d,--daemon [yes|no]] [-e,--execute cmd]\n";
+      cout<<"Syntax: dnsdist [-C,--config file] [-c,--client] [-d,--daemon] [-e,--execute cmd]\n";
       cout<<"[-h,--help] [-l,--local addr]\n";
       cout<<"\n";
       cout<<"-C,--config file      Load configuration from 'file'\n";
       cout<<"-c,--client           Operate as a client, connect to dnsdist\n";
-      cout<<"-d,--daemon=[yes|no]  Operate as a daemon or not\n";
+      cout<<"-d,--daemon           Operate as a daemon\n";
       cout<<"-e,--execute cmd      Connect to dnsdist and execute 'cmd'\n";
       cout<<"-h,--help             Display this helpful message\n";
       cout<<"-l,--local address    Listen on this local address\n";