Beispiel #1
0
func showServices(out io.Writer) error {
	err := launchd.ShowServices([]string{"keybase.service", "homebrew.mxcl.keybase"}, "Keybase", out)
	if err != nil {
		return err
	}
	err = launchd.ShowServices([]string{"keybase.kbfs.", "homebrew.mxcl.kbfs"}, "KBFS", out)
	if err != nil {
		return err
	}
	return nil
}
func NewCmdLaunchdList(cl *libcmdline.CommandLine) cli.Command {
	return cli.Command{
		Name:  "list",
		Usage: "List keybase launchd services",
		Action: func(c *cli.Context) {
			var err error
			err = launchd.ShowServices("keybase.", "Keybase")
			if err != nil {
				G.Log.Fatalf("%v", err)
			}
			err = launchd.ShowServices("kbfs.", "KBFS")
			if err != nil {
				G.Log.Fatalf("%v", err)
			}
			os.Exit(0)
		},
	}
}
Beispiel #3
0
func NewCmdLaunchdList(cl *libcmdline.CommandLine, g *libkb.GlobalContext) cli.Command {
	return cli.Command{
		Name:  "list",
		Usage: "List keybase launchd services",
		Action: func(c *cli.Context) {
			// TODO: Use ChooseCommand
			var err error
			err = launchd.ShowServices([]string{"keybase.service", "homebrew.mxcl.keybase"}, "Keybase", g.Log)
			if err != nil {
				g.Log.Fatalf("%v", err)
			}
			err = launchd.ShowServices([]string{"keybase.kbfs.", "homebrew.mxcl.kbfs"}, "KBFS", g.Log)
			if err != nil {
				g.Log.Fatalf("%v", err)
			}
			os.Exit(0)
		},
	}
}