// execArgs returns an unquoted array of service arguments in case we need // them later. One notable place where this is needed, is the windows service // package, where CreateService correctly does quoting of executable path and // individual arguments func (ai AgentInfo) execArgs(renderer shell.Renderer) []string { return []string{ string(ai.Kind), "--data-dir", renderer.FromSlash(ai.DataDir), idOptions[ai.Kind], ai.ID, "--debug", } }
func (ai AgentInfo) cmd(renderer shell.Renderer) string { // The agent always starts with debug turned on. The logger worker // will update this to the system logging environment as soon as // it starts. return strings.Join([]string{ renderer.Quote(ai.jujud(renderer)), string(ai.Kind), "--data-dir", renderer.Quote(renderer.FromSlash(ai.DataDir)), idOptions[ai.Kind], ai.ID, "--debug", }, " ") }
// ToolsDir returns the path to the agent's tools dir. func (ai AgentInfo) ToolsDir(renderer shell.Renderer) string { return renderer.FromSlash(tools.ToolsDir(ai.DataDir, ai.name)) }
func (ai AgentInfo) logFile(renderer shell.Renderer) string { return renderer.Join(renderer.FromSlash(ai.LogDir), ai.name+".log") }