uninstall-watchdog

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Uninstall Watchdog

卸载Watchdog

Overview

概述

Removes the egregore watchdog daemon and cleans up all files created by the install-watchdog skill. After uninstalling, egregore sessions will no longer be relaunched automatically.
移除egregore watchdog守护进程并清理所有由install-watchdog skill创建的文件。卸载后,egregore会话将不再自动重启。

When To Use

使用场景

  • When you no longer want autonomous relaunching.
  • Before removing the egregore plugin from a project.
  • When switching from daemon mode to manual invocation.
  • 当您不再需要自动重启功能时。
  • 在从项目中移除egregore插件之前。
  • 从守护进程模式切换到手动调用模式时。

When NOT To Use

不适用场景

  • When the watchdog was never installed (check first with the verify commands below).
  • 当从未安装过watchdog时(请先使用下方的验证命令检查)。

Uninstall Steps

卸载步骤

1. Detect the operating system

1. 检测操作系统

bash
OS=$(uname -s)
bash
OS=$(uname -s)

2. Stop and remove the service

2. 停止并移除服务

macOS (launchd):
bash
PLIST=~/Library/LaunchAgents/com.egregore.watchdog.plist
macOS (launchd):
bash
PLIST=~/Library/LaunchAgents/com.egregore.watchdog.plist

Unload the agent (stops it if running)

Unload the agent (stops it if running)

launchctl unload "$PLIST" 2>/dev/null
launchctl unload "$PLIST" 2>/dev/null

Remove the plist file

Remove the plist file

rm -f "$PLIST"

**Linux (systemd):**

```bash
rm -f "$PLIST"

**Linux (systemd):**

```bash

Stop and disable the timer and service

Stop and disable the timer and service

systemctl --user stop egregore-watchdog.timer 2>/dev/null systemctl --user disable egregore-watchdog.timer 2>/dev/null
systemctl --user stop egregore-watchdog.timer 2>/dev/null systemctl --user disable egregore-watchdog.timer 2>/dev/null

Remove unit files

Remove unit files

rm -f ~/.config/systemd/user/egregore-watchdog.timer rm -f ~/.config/systemd/user/egregore-watchdog.service
rm -f ~/.config/systemd/user/egregore-watchdog.timer rm -f ~/.config/systemd/user/egregore-watchdog.service

Reload systemd to pick up the removal

Reload systemd to pick up the removal

systemctl --user daemon-reload
undefined
systemctl --user daemon-reload
undefined

3. Clean up associated files

3. 清理相关文件

bash
undefined
bash
undefined

Remove pidfile if present

Remove pidfile if present

rm -f ~/.egregore/watchdog.pid
rm -f ~/.egregore/watchdog.pid

Remove watchdog log

Remove watchdog log

rm -f ~/.egregore/watchdog.log
undefined
rm -f ~/.egregore/watchdog.log
undefined

4. Confirm removal

4. 确认移除

macOS:
bash
launchctl list | grep egregore
macOS:
bash
launchctl list | grep egregore

Should produce no output

Should produce no output


**Linux:**

```bash
systemctl --user list-timers | grep egregore

**Linux:**

```bash
systemctl --user list-timers | grep egregore

Should produce no output

Should produce no output


Report to the user that the watchdog has been removed and
automatic relaunching is disabled.

告知用户watchdog已移除,自动重启功能已禁用。

Files Removed

已移除文件

FilePlatformPurpose
~/Library/LaunchAgents/com.egregore.watchdog.plist
macOSlaunchd agent definition
~/.config/systemd/user/egregore-watchdog.timer
Linuxsystemd timer unit
~/.config/systemd/user/egregore-watchdog.service
Linuxsystemd service unit
~/.egregore/watchdog.pid
bothPID of last watchdog run
~/.egregore/watchdog.log
macOSwatchdog output log
文件平台用途
~/Library/LaunchAgents/com.egregore.watchdog.plist
macOSlaunchd代理定义
~/.config/systemd/user/egregore-watchdog.timer
Linuxsystemd定时器单元
~/.config/systemd/user/egregore-watchdog.service
Linuxsystemd服务单元
~/.egregore/watchdog.pid
两者上次watchdog运行的PID
~/.egregore/watchdog.log
macOSwatchdog输出日志