(app *cli.App, _ chan struct{})
| 19 | ) |
| 20 | |
| 21 | func runApp(app *cli.App, _ chan struct{}) { |
| 22 | app.Commands = append(app.Commands, &cli.Command{ |
| 23 | Name: "service", |
| 24 | Usage: "Manages the cloudflared launch agent", |
| 25 | Subcommands: []*cli.Command{ |
| 26 | { |
| 27 | Name: "install", |
| 28 | Usage: "Install cloudflared as an user launch agent", |
| 29 | Action: cliutil.ConfiguredAction(installLaunchd), |
| 30 | }, |
| 31 | { |
| 32 | Name: "uninstall", |
| 33 | Usage: "Uninstall the cloudflared launch agent", |
| 34 | Action: cliutil.ConfiguredAction(uninstallLaunchd), |
| 35 | }, |
| 36 | }, |
| 37 | }) |
| 38 | _ = app.Run(os.Args) |
| 39 | } |
| 40 | |
| 41 | func newLaunchdTemplate(installPath, stdoutPath, stderrPath string) *ServiceTemplate { |
| 42 | return &ServiceTemplate{ |
no test coverage detected