Start implements plugins.ProcAdapter.
(command, dir string)
| 37 | |
| 38 | // Start implements plugins.ProcAdapter. |
| 39 | func (a *procToolAdapter) Start(command, dir string) (string, error) { |
| 40 | if dir != "" { |
| 41 | if expanded, err := utils.ExpandPath(dir); err == nil { |
| 42 | dir = expanded |
| 43 | } |
| 44 | } |
| 45 | info, err := a.supervisor().Start(command, dir) |
| 46 | if err != nil { |
| 47 | return "", err |
| 48 | } |
| 49 | return fmt.Sprintf("started %s (pid %d): %s\nPoll readiness with @proc logs {\"id\":%q} before testing against it.", |
| 50 | info.ID, info.PID, info.Command, info.ID), nil |
| 51 | } |
| 52 | |
| 53 | // Status implements plugins.ProcAdapter. |
| 54 | func (a *procToolAdapter) Status(id string) (string, error) { |