Browse Source

new config management

develop
Robin Thoni 9 years ago
parent
commit
6925b9a577
1 changed files with 4 additions and 7 deletions
  1. 4
    7
      src/Interface/MainClass.cpp

+ 4
- 7
src/Interface/MainClass.cpp View File

15
 
15
 
16
 int MainClass::main()
16
 int MainClass::main()
17
 {
17
 {
18
-    CommandLineOption configFile("config", 'c', "Path to the configuration directory", "PATH", "/etc/pdns-slave/");
18
+    CommandLineOption configFile("config", 'c', "Path to the configuration file",
19
+                                 "FILE", "/etc/pdns-slave/pdns-slave.json");
19
     CommandLineOption help("help", 'h', "Displays this help", "", "");
20
     CommandLineOption help("help", 'h', "Displays this help", "", "");
20
     CommandLineParser parser(_argc, _argv);
21
     CommandLineParser parser(_argc, _argv);
21
     parser.addOption(&help);
22
     parser.addOption(&help);
25
     if (help.isSet())
26
     if (help.isSet())
26
         return parser.showHelp(0, false);
27
         return parser.showHelp(0, false);
27
 
28
 
28
-    auto path = configFile.getValue();
29
-    std::cout << "Using configuration directory " << path << std::endl;
30
-
31
-    auto sqlPath = path + "/sql.json";
32
-    auto hostsPath = path + "/hosts.json";
33
-    auto dhcpPath = path + "/dhcp.conf";
29
+    auto file = configFile.getValue();
30
+    std::cout << "Using configuration file " << file << std::endl;
34
 
31
 
35
     return 0;
32
     return 0;
36
 }
33
 }

Loading…
Cancel
Save