code: func getAgent(ctx context.Context) (*Agent, error) {
  	if systemdFound() {
  		agent := Agent{
  			agentAutoStartPath:        "/etc/systemd/system/machine-provider-agent.service",
  			agentAutoStartTemplate:    "machine-provider-agent.service.tmpl",
  			logsDir:                   "/var/log/machine-provider-agent",
  			swarmingAutoStartPath:     "/etc/systemd/system/swarming-start-bot.service",
  			swarmingAutoStartTemplate: "swarming-start-bot.service.tmpl",
  			swarmingBotDir:            "/b/s",
  			strategy:                  SystemdStrategy{},
  		}
  		logging.Infof(ctx, "Using systemd Linux agent.")
  		return &agent, nil
  	}
  
  	if upstartFound() {
  		agent := Agent{
  			agentAutoStartPath:        "/etc/init/machine-provider-agent.conf",
  			agentAutoStartTemplate:    "machine-provider-agent.conf.tmpl",
  			logsDir:                   "/var/log/messages/machine-provider-agent",
  			swarmingAutoStartPath:     "/etc/init/swarming-start-bot.conf",
  			swarmingAutoStartTemplate: "swarming-start-bot.conf.tmpl",
  			swarmingBotDir:            "/b/s",
  			strategy:                  UpstartStrategy{},
  		}
  		logging.Infof(ctx, "Using Upstart Linux agent.")
  		return &agent, nil
  	}
  
  	return nil, errors.New("unsupported init system, expected systemd or Upstart")
  }
docs: // getAgent returns an agent which runs on Linux, depending on supported init systems.