uninstall-watchdog
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseUninstall 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.plistmacOS (launchd):
bash
PLIST=~/Library/LaunchAgents/com.egregore.watchdog.plistUnload 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):**
```bashrm -f "$PLIST"
**Linux (systemd):**
```bashStop 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
undefinedsystemctl --user daemon-reload
undefined3. Clean up associated files
3. 清理相关文件
bash
undefinedbash
undefinedRemove 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
undefinedrm -f ~/.egregore/watchdog.log
undefined4. Confirm removal
4. 确认移除
macOS:
bash
launchctl list | grep egregoremacOS:
bash
launchctl list | grep egregoreShould produce no output
Should produce no output
**Linux:**
```bash
systemctl --user list-timers | grep egregore
**Linux:**
```bash
systemctl --user list-timers | grep egregoreShould 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
已移除文件
| File | Platform | Purpose |
|---|---|---|
| macOS | launchd agent definition |
| Linux | systemd timer unit |
| Linux | systemd service unit |
| both | PID of last watchdog run |
| macOS | watchdog output log |
| 文件 | 平台 | 用途 |
|---|---|---|
| macOS | launchd代理定义 |
| Linux | systemd定时器单元 |
| Linux | systemd服务单元 |
| 两者 | 上次watchdog运行的PID |
| macOS | watchdog输出日志 |