diff --git a/client/Daemon.cpp b/client/Daemon.cpp index 79b8032d..e7a3575d 100644 --- a/client/Daemon.cpp +++ b/client/Daemon.cpp @@ -56,7 +56,19 @@ namespace i2p LogPrint("\n\n\n\ni2pd starting\n"); LogPrint("Version ", VERSION); LogPrint("data directory: ", i2p::util::filesystem::GetDataDir().string()); - i2p::util::filesystem::ReadConfigFile(i2p::util::config::mapArgs, i2p::util::config::mapMultiArgs); + i2p::util::filesystem::ReadConfigFile( + i2p::util::config::mapArgs, i2p::util::config::mapMultiArgs + ); + + if(i2p::util::config::HasArg("-install")) { + try { + i2p::util::filesystem::InstallFiles(); + LogPrint("Succesfully installed all files."); + } catch(const std::runtime_error& e) { + LogPrint(eLogError, "Failed to install: ", e.what()); + return false; + } + } isDaemon = i2p::util::config::GetArg("-daemon", 0); isLogging = i2p::util::config::GetArg("-log", 1); @@ -104,7 +116,6 @@ namespace i2p else StartLog (""); // write to stdout } - d.httpServer = new i2p::util::HTTPServer( i2p::util::config::GetArg("-httpaddress", "127.0.0.1"), i2p::util::config::GetArg("-httpport", 7070) diff --git a/client/HTTPServer.cpp b/client/HTTPServer.cpp index cff6256c..6f0bf309 100644 --- a/client/HTTPServer.cpp +++ b/client/HTTPServer.cpp @@ -107,7 +107,9 @@ void HTTPConnection::Send404Reply() "
It looks like your webui installation is broken.
" "Run the following command to (re)install it:
" - "./i2pd --install /path/to/webui" + "
./i2pd --install=/path/to/webui" + "
Or from a directory containing a folder named webui:
" + "./i2pd --install" "
The webui folder should come with the binaries.
" "