mirror of https://github.com/Icinga/icinga2.git
Use ScriptVariable::Get for "agent wizard" and "agent setup"
fixes #7520
This commit is contained in:
parent
3fc3f05bb4
commit
f8799f0252
|
@ -21,11 +21,11 @@
|
|||
#include "cli/agentutility.hpp"
|
||||
#include "cli/featureutility.hpp"
|
||||
#include "cli/pkiutility.hpp"
|
||||
#include "cli/variableutility.hpp"
|
||||
#include "base/logger.hpp"
|
||||
#include "base/console.hpp"
|
||||
#include "base/application.hpp"
|
||||
#include "base/tlsutility.hpp"
|
||||
#include "base/scriptvariable.hpp"
|
||||
#include <boost/foreach.hpp>
|
||||
#include <boost/algorithm/string/classification.hpp>
|
||||
#include <boost/algorithm/string/join.hpp>
|
||||
|
@ -133,8 +133,8 @@ int AgentSetupCommand::SetupMaster(const boost::program_options::variables_map&
|
|||
return 1;
|
||||
}
|
||||
|
||||
String user = VariableUtility::GetVariable("RunAsUser");
|
||||
String group = VariableUtility::GetVariable("RunAsUser");
|
||||
String user = ScriptVariable::Get("RunAsUser");
|
||||
String group = ScriptVariable::Get("RunAsGroup");
|
||||
|
||||
if (!Utility::SetFileOwnership(pki_path, user, group)) {
|
||||
Log(LogWarning, "cli")
|
||||
|
@ -365,8 +365,8 @@ int AgentSetupCommand::SetupAgent(const boost::program_options::variables_map& v
|
|||
return 1;
|
||||
}
|
||||
|
||||
String user = VariableUtility::GetVariable("RunAsUser");
|
||||
String group = VariableUtility::GetVariable("RunAsUser");
|
||||
String user = ScriptVariable::Get("RunAsUser");
|
||||
String group = ScriptVariable::Get("RunAsGroup");
|
||||
|
||||
if (!Utility::SetFileOwnership(pki_path, user, group)) {
|
||||
Log(LogWarning, "cli")
|
||||
|
|
|
@ -21,11 +21,11 @@
|
|||
#include "cli/agentutility.hpp"
|
||||
#include "cli/pkiutility.hpp"
|
||||
#include "cli/featureutility.hpp"
|
||||
#include "cli/variableutility.hpp"
|
||||
#include "base/logger.hpp"
|
||||
#include "base/console.hpp"
|
||||
#include "base/application.hpp"
|
||||
#include "base/tlsutility.hpp"
|
||||
#include "base/scriptvariable.hpp"
|
||||
#include <boost/foreach.hpp>
|
||||
#include <boost/algorithm/string/join.hpp>
|
||||
#include <boost/algorithm/string/replace.hpp>
|
||||
|
@ -226,8 +226,8 @@ wizard_master_host:
|
|||
return 1;
|
||||
}
|
||||
|
||||
String user = VariableUtility::GetVariable("RunAsUser");
|
||||
String group = VariableUtility::GetVariable("RunAsUser");
|
||||
String user = ScriptVariable::Get("RunAsUser");
|
||||
String group = ScriptVariable::Get("RunAsGroup");
|
||||
|
||||
if (!Utility::SetFileOwnership(pki_path, user, group)) {
|
||||
Log(LogWarning, "cli")
|
||||
|
@ -429,8 +429,8 @@ wizard_ticket:
|
|||
return 1;
|
||||
}
|
||||
|
||||
String user = VariableUtility::GetVariable("RunAsUser");
|
||||
String group = VariableUtility::GetVariable("RunAsUser");
|
||||
String user = ScriptVariable::Get("RunAsUser");
|
||||
String group = ScriptVariable::Get("RunAsGroup");
|
||||
|
||||
if (!Utility::SetFileOwnership(pki_path, user, group)) {
|
||||
Log(LogWarning, "cli")
|
||||
|
|
Loading…
Reference in New Issue