Beispiel #1
0
func startDaemon(c *cli.Context) {
	if daemon.IsDaemonized() {
		log.Error("Daemon is already running!")
		return
	}

	daemon.Daemonize(background, termHandler)
}
Beispiel #2
0
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 ..")
}