+/**
+ * This file is read by Icinga 2 before the main
+ * configuration file (icinga2.conf) is processed.
+ */
+
const RunAsUser = "@ICINGA2_USER@"
const RunAsGroup = "@ICINGA2_GROUP@"
("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");
}
}
- 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();