func (sv *Unit) Start() (err error) {
	e := log.WithField("ExecStart", sv.Definition.Service.ExecStart)

	e.Debug("sv.Start")

	switch sv.Definition.Service.Type {
	case "simple":
		if err = sv.Cmd.Start(); err == nil {
			go sv.Cmd.Wait()
		}
	case "oneshot":
		err = sv.Cmd.Run()
	default:
		panic("Unknown service type")
	}

	e.WithField("err", err).Debug("started")
	return
}
// Start executes the command specified in service definition
Start executes the command specified in service definition
// Start executes the command specified in service definition
func (sv *Unit) Start() (err error) {
	e := log.WithField("ExecStart", sv.Definition.Service.ExecStart)
	e.Debug("sv.Start")
	switch sv.Definition.Service.Type {
	case "simple":
		if err = sv.Cmd.Start(); err == nil {
			go sv.Cmd.Wait()
		}
	case "oneshot":
		err = sv.Cmd.Run()
	default:
		panic("Unknown service type")
	}
	e.WithField("err", err).Debug("started")
	return
}
func ( sv * Unit ) Start ( ) ( err error ) { e := log . WithField ( " " , sv . Definition . Service . ExecStart ) e . Debug ( " " ) switch sv . Definition . Service . Type { case " " : if err = sv . Cmd . Start ( ) ; err == nil { go sv . Cmd . Wait ( ) } case " " : err = sv . Cmd . Run ( ) default : panic ( " " ) } e . WithField ( " " , err ) . Debug ( " " ) return }
Start executes the command specified in service definition
Start executes the command specified in service definition