|
@@ -5,6 +5,7 @@
|
5
|
5
|
#include <iostream>
|
6
|
6
|
#include <sysexits.h>
|
7
|
7
|
#include "CommandLineParser.h"
|
|
8
|
+#include "Business/PdnsSlave.h"
|
8
|
9
|
#include "MainClass.h"
|
9
|
10
|
|
10
|
11
|
MainClass::MainClass(int argc, char *argv[])
|
|
@@ -26,8 +27,20 @@ int MainClass::main()
|
26
|
27
|
if (help.isSet())
|
27
|
28
|
return parser.showHelp(0, false);
|
28
|
29
|
|
29
|
|
- auto file = configFile.getValue();
|
30
|
|
- std::cout << "Using configuration file " << file << std::endl;
|
|
30
|
+ auto filePath = configFile.getValue();
|
|
31
|
+ std::cout << "Using configuration file " << filePath << std::endl;
|
|
32
|
+
|
|
33
|
+ PdnsSlave pdnsSlave(filePath);
|
|
34
|
+ if (!pdnsSlave.readConfig())
|
|
35
|
+ {
|
|
36
|
+ std::cerr << "Failed to read pdns-slave configuration" << std::endl;
|
|
37
|
+ return 1;
|
|
38
|
+ }
|
|
39
|
+ if (!pdnsSlave.readDhcpdTemplate())
|
|
40
|
+ {
|
|
41
|
+ std::cerr << "Failed to read dhcpd template" << std::endl;
|
|
42
|
+ return 2;
|
|
43
|
+ }
|
31
|
44
|
|
32
|
45
|
return 0;
|
33
|
46
|
}
|