Skip to content

Commit

Permalink
Remove --user and --group
Browse files Browse the repository at this point in the history
refs #7246
  • Loading branch information
gunnarbeutner committed Oct 13, 2014
1 parent 43bb512 commit 15bd96a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
5 changes: 5 additions & 0 deletions etc/icinga2/init.conf.cmake
@@ -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@"
13 changes: 1 addition & 12 deletions icinga-app/icinga.cpp
Expand Up @@ -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");

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

Expand Down

0 comments on commit 15bd96a

Please sign in to comment.