summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mad-server.cpp5
-rw-r--r--src/mad.conf3
-rw-r--r--src/mad.cpp5
3 files changed, 6 insertions, 7 deletions
diff --git a/src/mad-server.cpp b/src/mad-server.cpp
index 4bc5087..84ddce3 100644
--- a/src/mad-server.cpp
+++ b/src/mad-server.cpp
@@ -17,10 +17,9 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "Core/ConfigManager.h"
-#include "Common/ModuleManager.h"
#include "Server/Application.h"
-#include "Server/ConnectionManager.h"
+#include "Core/ConfigManager.h"
+
using namespace Mad;
diff --git a/src/mad.conf b/src/mad.conf
new file mode 100644
index 0000000..1d5ca61
--- /dev/null
+++ b/src/mad.conf
@@ -0,0 +1,3 @@
+LoadModule "FileLogger"
+LoadModule "SystemBackendPosix"
+LoadModule "SystemBackendProc"
diff --git a/src/mad.cpp b/src/mad.cpp
index 3e4883c..2a6b50a 100644
--- a/src/mad.cpp
+++ b/src/mad.cpp
@@ -39,10 +39,7 @@ using namespace Mad;
int main() {
Daemon::Application application;
- application.getModuleManager()->loadModule("FileLogger");
- application.getModuleManager()->loadModule("SystemBackendPosix");
- application.getModuleManager()->loadModule("SystemBackendProc");
-
+ application.getConfigManager()->loadFile("mad.conf");
application.getConfigManager()->finish();
application.getRequestManager()->registerPacketType<Daemon::RequestHandlers::CommandRequestHandler>("Command");