diff --git a/lib/cli/agentsetupcommand.cpp b/lib/cli/agentsetupcommand.cpp index 2c4dbf4fa..aed639798 100644 --- a/lib/cli/agentsetupcommand.cpp +++ b/lib/cli/agentsetupcommand.cpp @@ -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 #include #include @@ -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") diff --git a/lib/cli/agentwizardcommand.cpp b/lib/cli/agentwizardcommand.cpp index 0aa18cae3..a579077e6 100644 --- a/lib/cli/agentwizardcommand.cpp +++ b/lib/cli/agentwizardcommand.cpp @@ -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 #include #include @@ -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")