mirror of https://github.com/Icinga/icinga2.git
parent
43bb5127ac
commit
15bd96aa9a
|
@ -1,2 +1,7 @@
|
|||
/**
|
||||
* This file is read by Icinga 2 before the main
|
||||
* configuration file (icinga2.conf) is processed.
|
||||
*/
|
||||
|
||||
const RunAsUser = "@ICINGA2_USER@"
|
||||
const RunAsGroup = "@ICINGA2_GROUP@"
|
||||
|
|
|
@ -132,12 +132,7 @@ int Main(void)
|
|||
("define,D", po::value<std::vector<std::string> >(), "define a constant")
|
||||
("library,l", po::value<std::vector<std::string> >(), "load a library")
|
||||
("include,I", po::value<std::vector<std::string> >(), "add include search directory")
|
||||
("log-level,x", po::value<std::string>(), "specify the log level for the console log")
|
||||
#ifndef _WIN32
|
||||
("user,u", po::value<std::string>(), "user to run Icinga as")
|
||||
("group,g", po::value<std::string>(), "group to run Icinga as")
|
||||
#endif /* _WIN32 */
|
||||
;
|
||||
("log-level,x", po::value<std::string>(), "specify the log level for the console log");
|
||||
|
||||
po::options_description hiddenDesc("Hidden options");
|
||||
|
||||
|
@ -179,12 +174,6 @@ int Main(void)
|
|||
}
|
||||
}
|
||||
|
||||
if (vm.count("group"))
|
||||
ScriptVariable::Set("RunAsGroup", String(vm["group"].as<std::string>()));
|
||||
|
||||
if (vm.count("user"))
|
||||
ScriptVariable::Set("RunAsUser", String(vm["user"].as<std::string>()));
|
||||
|
||||
#ifndef _WIN32
|
||||
String group = Application::GetRunAsGroup();
|
||||
|
||||
|
|
Loading…
Reference in New Issue