WIP: Save current state - security subsystems, migrations, logging
This commit is contained in:
@@ -33,6 +33,10 @@ func (s *InstallTemplateService) RenderInstallScript(agent *models.Agent, binary
|
||||
Platform string
|
||||
Architecture string
|
||||
Version string
|
||||
AgentUser string
|
||||
AgentHome string
|
||||
ConfigDir string
|
||||
LogDir string
|
||||
}{
|
||||
AgentID: agent.ID.String(),
|
||||
BinaryURL: binaryURL,
|
||||
@@ -40,6 +44,10 @@ func (s *InstallTemplateService) RenderInstallScript(agent *models.Agent, binary
|
||||
Platform: agent.OSType,
|
||||
Architecture: agent.OSArchitecture,
|
||||
Version: agent.CurrentVersion,
|
||||
AgentUser: "redflag-agent",
|
||||
AgentHome: "/var/lib/redflag-agent",
|
||||
ConfigDir: "/etc/redflag",
|
||||
LogDir: "/var/log/redflag",
|
||||
}
|
||||
|
||||
// Choose template based on platform
|
||||
@@ -90,6 +98,10 @@ func (s *InstallTemplateService) RenderInstallScriptFromBuild(
|
||||
Version string
|
||||
ServerURL string
|
||||
RegistrationToken string
|
||||
AgentUser string
|
||||
AgentHome string
|
||||
ConfigDir string
|
||||
LogDir string
|
||||
}{
|
||||
AgentID: agentID,
|
||||
BinaryURL: binaryURL,
|
||||
@@ -99,6 +111,10 @@ func (s *InstallTemplateService) RenderInstallScriptFromBuild(
|
||||
Version: version,
|
||||
ServerURL: serverURL,
|
||||
RegistrationToken: registrationToken,
|
||||
AgentUser: "redflag-agent",
|
||||
AgentHome: "/var/lib/redflag-agent",
|
||||
ConfigDir: "/etc/redflag",
|
||||
LogDir: "/var/log/redflag",
|
||||
}
|
||||
|
||||
templateName := "templates/install/scripts/linux.sh.tmpl"
|
||||
@@ -144,6 +160,10 @@ func (s *InstallTemplateService) BuildAgentConfigWithAgentID(
|
||||
Architecture string
|
||||
Version string
|
||||
ServerURL string
|
||||
AgentUser string
|
||||
AgentHome string
|
||||
ConfigDir string
|
||||
LogDir string
|
||||
}{
|
||||
AgentID: agentID,
|
||||
BinaryURL: binaryURL,
|
||||
@@ -152,6 +172,10 @@ func (s *InstallTemplateService) BuildAgentConfigWithAgentID(
|
||||
Architecture: architecture,
|
||||
Version: version,
|
||||
ServerURL: serverURL,
|
||||
AgentUser: "redflag-agent",
|
||||
AgentHome: "/var/lib/redflag-agent",
|
||||
ConfigDir: "/etc/redflag",
|
||||
LogDir: "/var/log/redflag",
|
||||
}
|
||||
|
||||
templateName := "templates/install/scripts/linux.sh.tmpl"
|
||||
|
||||
Reference in New Issue
Block a user