(which string)
| 13 | ) |
| 14 | |
| 15 | func run(which string) { |
| 16 | _ = result.RetVoid(exec.Command("/bin/sh", "-c", "title", config.FullName).Start()) |
| 17 | |
| 18 | switch which { |
| 19 | case "cmd": |
| 20 | cmd.Run() |
| 21 | |
| 22 | case "web": |
| 23 | fallthrough |
| 24 | default: |
| 25 | ctrl := make(chan os.Signal, 1) |
| 26 | signal.Notify(ctrl, os.Interrupt, os.Kill) |
| 27 | go web.Run() |
| 28 | <-ctrl |
| 29 | } |
| 30 | } |