#!/bin/bash # Momentry Core 移除腳本 set -e INSTALL_DIR="$HOME/Library/Application Support/MomentryCore" LAUNCHD_DIR="$HOME/Library/LaunchAgents" echo ">>> 停止服務..." launchctl bootout "gui/$(id -u)/com.momentry-core.server" 2>/dev/null || true launchctl bootout "gui/$(id -u)/com.momentry-core.worker" 2>/dev/null || true echo ">>> 移除 launchd plists..." rm -f "$LAUNCHD_DIR/com.momentry-core.server.plist" rm -f "$LAUNCHD_DIR/com.momentry-core.worker.plist" echo ">>> 移除安裝目錄..." rm -rf "$INSTALL_DIR" echo "" echo "================================================" echo " 移除完成!" echo " 注意: 資料庫和外部服務資料未被刪除" echo "================================================"