mirror of https://github.com/Icinga/icinga2.git
Take a note why the explicit configDir variable is needed on Windows
This commit is contained in:
parent
857c812227
commit
a2a1f5c8d2
|
@ -359,7 +359,10 @@ static int Main()
|
|||
GetUserName(username, &usernameLen);
|
||||
|
||||
std::ifstream userFile;
|
||||
userFile.open(Application::GetConst("ConfigDir") + "/user");
|
||||
|
||||
/* The implicit string assignment is needed for Windows builds. */
|
||||
String configDir = Application::GetConst("ConfigDir");
|
||||
userFile.open(configDir + "/user");
|
||||
|
||||
if (userFile && command && !Application::IsProcessElevated()) {
|
||||
std::string userLine;
|
||||
|
|
|
@ -205,6 +205,7 @@ int DaemonCommand::Run(const po::variables_map& vm, const std::vector<std::strin
|
|||
if (vm.count("config") > 0)
|
||||
configs = vm["config"].as<std::vector<std::string> >();
|
||||
else if (!vm.count("no-config")) {
|
||||
/* The implicit string assignment is needed for Windows builds. */
|
||||
String configDir = Application::GetConst("ConfigDir");
|
||||
configs.push_back(configDir + "/icinga2.conf");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue