Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var StartCommand = &cli.Command{ Name: "start", Usage: "start rogue finder-web server", Flags: []cli.Flag{ &cli.BoolFlag{Name: "daemon", Value: false, Usage: "run rogue finder-web in background"}, }, Action: func(ctx *cli.Context) error { defer func() { for _, err := range self.RunClearFuncs() { log.Printf("[E] Run clear funcs: %v", err) } }() if isDaemon := ctx.Bool("daemon"); isDaemon { if err := procutil.RunInBackground(runutil.ExecutableName, []string{"start"}, nil, nil); err != nil { log.Fatalf("[F] Run app in background failure, nest error: %v", err) } return nil } if err := setupConfig(); err != nil { return err } setGlobalVars() if err := runServer(); err != nil { return err } procutil.WaitForSigterm() return nil }, }
View Source
var StopCommand = &cli.Command{ Name: "stop", Usage: "stop finder-web server", Action: func(ctx *cli.Context) error { var pidFile = filepath.Join(runutil.ExecutableDir, "../var/run/rogue-finder-web.pid") process, err := procutil.FindWithPidFile(pidFile) if err != nil { return err } else { if err := process.Signal(syscall.SIGQUIT); err != nil { return nil } } return nil }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.