2014-02-01 04:09:55 +01:00
|
|
|
#include <boost/filesystem.hpp>
|
2014-02-05 00:50:13 +01:00
|
|
|
|
2014-01-30 01:56:48 +01:00
|
|
|
#include "util.h"
|
2014-04-20 03:54:34 +02:00
|
|
|
#include "Daemon.h"
|
2014-02-05 01:28:18 +01:00
|
|
|
|
2014-01-30 01:56:48 +01:00
|
|
|
int main( int argc, char* argv[] )
|
2013-12-10 14:05:42 +01:00
|
|
|
{
|
2014-04-20 03:54:34 +02:00
|
|
|
i2p::util::config::OptionParser(argc, argv);
|
2014-03-17 23:31:29 +01:00
|
|
|
|
2014-04-20 03:54:34 +02:00
|
|
|
LogPrint("\n\n\n\ni2pd starting\n");
|
|
|
|
LogPrint("data directory: ", i2p::util::filesystem::GetDataDir().string());
|
|
|
|
i2p::util::filesystem::ReadConfigFile(i2p::util::config::mapArgs, i2p::util::config::mapMultiArgs);
|
2014-02-05 00:43:50 +01:00
|
|
|
|
2014-04-20 03:54:34 +02:00
|
|
|
Daemon.start();
|
|
|
|
while (Daemon.running)
|
|
|
|
{
|
|
|
|
//TODO Meeh: Find something better to do here.
|
|
|
|
std::this_thread::sleep_for (std::chrono::seconds(1));
|
|
|
|
}
|
2014-04-22 06:25:19 +02:00
|
|
|
Daemon.stop();
|
2014-02-05 00:50:13 +01:00
|
|
|
|
2014-04-20 03:54:34 +02:00
|
|
|
return 0;
|
2013-12-10 14:05:42 +01:00
|
|
|
}
|