func reload(arg interface{}) { opts := arg.(*specs.CmdOpts) conf := conf.Parse(opts.ConfigFile, false) app := specs.NewProcess(conf.PidFile, conf.Modules) if err := app.Kill(syscall.SIGUSR1); err != nil { glog.Fatal(err) } }
func start(arg interface{}) { app := specs.NewProcess(pidfile, []specs.Module{specs.Module(&ct)}) if err := app.Check(); err != nil { glog.Fatal(err) } if err := app.Save(); err != nil { glog.Fatal(err) } runtime.GOMAXPROCS(runtime.NumCPU()) app.Start() }
func start(arg interface{}) { opts := arg.(*specs.CmdOpts) conf := conf.Parse(opts.ConfigFile, false) app := specs.NewProcess(conf.PidFile, conf.Modules) if err := app.Check(); err != nil { glog.Fatal(err) } if err := app.Save(); err != nil { glog.Fatal(err) } dir, _ := os.Getwd() glog.V(4).Infof("work dir :%s", dir) glog.V(4).Infof("\n%s", conf) runtime.GOMAXPROCS(runtime.NumCPU()) app.Start() }
func stop(arg interface{}) { app := specs.NewProcess(pidfile, []specs.Module{specs.Module(&ct)}) if err := app.Kill(syscall.SIGTERM); err != nil { glog.Fatal(err) } }