示例#1
0
func (c *cli) CmdUpgrade(args ...string) error {
	pid := process.GetRemoteProcPid()
	if pid > 0 {
		err := syscall.Kill(pid, syscall.SIGUSR2)
		if err != nil {
			log.Errorf("Unable to upgrade binary: %v", err)
		}
	} else {
		log.Error("No pid found. Ensures the server is running.")
	}
	return nil
}
示例#2
0
func (c *cli) CmdReload(args ...string) error {
	pid := process.GetRemoteProcPid()
	if pid > 0 {
		err := syscall.Kill(pid, syscall.SIGHUP)
		if err != nil {
			log.Errorf("Unable to reload configuration: %v", err)
		}
	} else {
		log.Error("No pid found. Ensures the server is running.")
	}
	return nil
}