summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/Common/ModuleManager.cpp2
-rw-r--r--src/mad-server.conf8
-rw-r--r--src/mad-server.cpp8
3 files changed, 9 insertions, 9 deletions
diff --git a/src/Common/ModuleManager.cpp b/src/Common/ModuleManager.cpp
index fc82ea8..551229c 100644
--- a/src/Common/ModuleManager.cpp
+++ b/src/Common/ModuleManager.cpp
@@ -59,7 +59,7 @@ bool ModuleManager::handleConfigEntry(const Core::ConfigEntry &entry, bool handl
if(handled)
return false;
- if(entry[0].getKey().matches("LoadModule")) {
+ if(entry[0].getKey().matches("LoadModule") && entry[1].empty()) {
if(!loadModule(entry[0][0].c_str()))
application->logf(Core::LoggerBase::ERROR, "Can't load module '%s'.", entry[0][0].c_str());
diff --git a/src/mad-server.conf b/src/mad-server.conf
index cca8e3a..b419a42 100644
--- a/src/mad-server.conf
+++ b/src/mad-server.conf
@@ -1,3 +1,11 @@
+LoadModule "FileLogger"
+LoadModule "SystemBackendPosix"
+LoadModule "SystemBackendProc"
+
+LoadModule "UserDBBackendMysql"
+LoadModule "UserConfigBackendHome"
+LoadModule "UserConfigBackendKrb5"
+
Logger Console
Logger File "mad-server.log"
diff --git a/src/mad-server.cpp b/src/mad-server.cpp
index 1700d1f..4bc5087 100644
--- a/src/mad-server.cpp
+++ b/src/mad-server.cpp
@@ -28,14 +28,6 @@ using namespace Mad;
int main() {
Server::Application application;
- application.getModuleManager()->loadModule("FileLogger");
- application.getModuleManager()->loadModule("SystemBackendPosix");
- application.getModuleManager()->loadModule("SystemBackendProc");
-
- application.getModuleManager()->loadModule("UserDBBackendMysql");
- application.getModuleManager()->loadModule("UserConfigBackendHome");
- application.getModuleManager()->loadModule("UserConfigBackendKrb5");
-
application.getConfigManager()->loadFile("mad-server.conf");
application.getConfigManager()->finish();