// This func is a little different than the others since we need to expose HAB_AUTH_TOKEN to a shell
// sub-process that's actually running the supervisor.
This func is a little different than the others since we need to expose HAB_AUTH_TOKEN to a shell
sub-process that's actually running the supervisor.
// This func is a little different than the others since we need to expose HAB_AUTH_TOKEN to a shell // sub - process that ' s actually running the supervisor .
func (p *provisioner) linuxStartHabitatUnmanaged(o terraform.UIOutput, comm communicator.Communicator, options string) error {
	var token string
	if err := p.runCommand(o, comm, p.linuxGetCommand("mkdir -p /hab/sup/default && chmod o+w /hab/sup/default")); err != nil {
		return err
	}
	if p.BuilderAuthToken != "" {
		token = fmt.Sprintf("env HAB_AUTH_TOKEN=%s ", p.BuilderAuthToken)
	}
	return p.runCommand(o, comm, p.linuxGetCommand(fmt.Sprintf("(%ssetsid hab sup run%s > /hab/sup/default/sup.log 2>&1 <&1 &) ; sleep 1", token, options)))
}
func ( p * provisioner ) linuxStartHabitatUnmanaged ( o terraform . UIOutput , comm communicator . Communicator , options string ) error { var token string if err := p . runCommand ( o , comm , p . linuxGetCommand ( " " ) ) ; err != nil { return err } if p . BuilderAuthToken != " " { token = fmt . Sprintf ( " " , p . BuilderAuthToken ) } return p . runCommand ( o , comm , p . linuxGetCommand ( fmt . Sprintf ( " " , token , options ) ) ) }
This func is a little different than the others since we need to expose HAB_AUTH_TOKEN to a shell
sub-process that's actually running the supervisor.
This func is a little different than the others since we need to expose HAB_AUTH_TOKEN to a shell sub - process that ' s actually running the supervisor .
// Create the sup directory for the log file // Set HAB_AUTH_TOKEN if provided