in util/common/agent_util_unix.go [140:160]
func StartAgentWithCommand(configOutputPath string, fatalOnFailure bool, ssm bool, agentStartCommand string) error {
path := "file:"
if ssm {
path = "ssm:"
}
completedAgentStartCommand := agentStartCommand + path + configOutputPath
log.Printf("Starting agent with command %s", completedAgentStartCommand)
out, err := exec.
Command("bash", "-c", completedAgentStartCommand).
Output()
if err != nil && fatalOnFailure {
log.Fatal(fmt.Sprint(err) + string(out))
} else if err != nil {
log.Printf(fmt.Sprint(err) + string(out))
} else {
log.Printf("Agent has started")
}
return err
}