add mikhail4021 Win32Service, run i2pd as admin

This commit is contained in:
chertov 2014-04-19 00:20:11 +04:00
parent e16fdd4890
commit e6e11590c8
8 changed files with 642 additions and 1 deletions

View file

@ -11,6 +11,8 @@
#include <signal.h>
#include <stdlib.h>
#include <unistd.h>
#else
#include "./Win32/Win32Service.h"
#endif
#include "Log.h"
@ -71,6 +73,9 @@ int main( int argc, char* argv[] )
setlocale(LC_ALL, "Russian");
#endif
#ifdef _WIN32
service_control(isDaemon);
#endif
LogPrint("\n\n\n\ni2pd starting\n");
LogPrint("data directory: ", i2p::util::filesystem::GetDataDir().string());
@ -168,6 +173,7 @@ int main( int argc, char* argv[] )
}
LogPrint("Shutdown started.");
httpProxy.Stop ();
i2p::stream::StopStreaming ();
i2p::garlic::routing.Stop ();
i2p::tunnel::tunnels.Stop ();