Remove --user and --group

refs #7246
This commit is contained in:
Gunnar Beutner 2014-10-13 16:07:04 +02:00
parent 43bb5127ac
commit 15bd96aa9a
2 changed files with 6 additions and 12 deletions

View File

@ -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@"

View File

@ -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();