mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 21:37:17 +01:00
Use Daemon.init in main()
This commit is contained in:
parent
0236879c26
commit
64ba1622c2
13
i2p.cpp
13
i2p.cpp
|
@ -1,16 +1,10 @@
|
||||||
#include <boost/filesystem.hpp>
|
#include <thread>
|
||||||
|
|
||||||
#include "util.h"
|
|
||||||
#include "Daemon.h"
|
#include "Daemon.h"
|
||||||
|
|
||||||
int main( int argc, char* argv[] )
|
int main( int argc, char* argv[] )
|
||||||
{
|
{
|
||||||
i2p::util::config::OptionParser(argc, argv);
|
Daemon.init(argc, argv);
|
||||||
|
|
||||||
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);
|
|
||||||
|
|
||||||
Daemon.start();
|
Daemon.start();
|
||||||
while (Daemon.running)
|
while (Daemon.running)
|
||||||
{
|
{
|
||||||
|
@ -18,6 +12,5 @@ int main( int argc, char* argv[] )
|
||||||
std::this_thread::sleep_for (std::chrono::seconds(1));
|
std::this_thread::sleep_for (std::chrono::seconds(1));
|
||||||
}
|
}
|
||||||
Daemon.stop();
|
Daemon.stop();
|
||||||
|
return EXIT_SUCCESS;
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue