示例#1
0
文件: commands.go 项目: eeayiaia/scmt
func startDaemon(c *cli.Context) {
	if daemon.IsDaemonized() {
		log.Error("Daemon is already running!")
		return
	}

	daemon.Daemonize(background, termHandler)
}
示例#2
0
文件: commands.go 项目: eeayiaia/scmt
func stopDaemon(c *cli.Context) {
	if !daemon.IsDaemonized() {
		log.Error("No daemon is running!")
		return
	}

	invoker.SendPacket(invoker.TYPE_STOP_DAEMON, *bytes.NewBufferString(""))
	log.Info("Stopping the daemon ..")
}