summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSandro Knauß <mail@sandroknauss.de>2014-05-29 16:49:56 (GMT)
committerSandro Knauß <mail@sandroknauss.de>2014-05-29 17:22:50 (GMT)
commit9c38cfc3131f63a19cdc52995a19ace144701136 (patch)
tree28c193af273492b1fd9336be7c396f17a6799e7c
parent37f3aef17ec095093afc868602a95dc470abeecf (diff)
downloadkolab-utils-9c38cfc3131f63a19cdc52995a19ace144701136.tar.gz
Let's start the daemon via command line
-rw-r--r--fbdaemon/main.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/fbdaemon/main.cpp b/fbdaemon/main.cpp
index 0a9f8dd..451ebe3 100644
--- a/fbdaemon/main.cpp
+++ b/fbdaemon/main.cpp
@@ -22,6 +22,7 @@
#include <kdebug.h>
#include <kglobal.h>
#include "fbcoordinator.h"
+#include "fbdaemonserver.h"
#include "settings.h"
#include "kolabutils-version.h"
@@ -36,7 +37,7 @@ int main(int argc, char *argv[])
options.add("c").add("configuration <file>", ki18n("Configuration file"), "/etc/kolab/kolab.conf");
options.add("g").add("generate", ki18n("Generate partial f/b lists for user"));
options.add("a").add("aggregate", ki18n("Aggregate partial f/b lists for user"));
- options.add("d").add("daemon", ki18n("Run daemon (todo)"));
+ options.add("d").add("daemon", ki18n("Run daemon"));
options.add("generateall", ki18n("Generate and aggregate for all users within domain"));
options.add("+[user/filter]", ki18n("User for generation/aggregation | Contains-Filter for userlist for which freebusy is generated (leave empty to generate for all)"));
@@ -78,8 +79,14 @@ int main(int argc, char *argv[])
}
}
+
if (args->isSet("daemon")) {
-
+ FbDaemonServer *server(new FbDaemonServer(&app));
+ if (!server->listen(QHostAddress::Any, args->arg(0).toUInt())) {
+ kWarning() << "Can't start server";
+ return -1;
+ }
+ nothingTodo = false;
}
if (!nothingTodo) {
app.exec();