func startDaemon(c *cli.Context) { if daemon.IsDaemonized() { log.Error("Daemon is already running!") return } daemon.Daemonize(background, termHandler) }
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 ..") }