Files
CoreInject/tool/cleanup_pd.sh
2025-08-04 23:37:13 +08:00

22 lines
613 B
Bash

#!/bin/bash
set -e
if pgrep -x "prl_disp_service" &>/dev/null; then
echo "[*] 正在停止 Parallels Desktop 主程序..."
if [ -f "/Library/LaunchDaemons/com.parallels.desktop.launchdaemon.plist" ]; then
launchctl stop /Library/LaunchDaemons/com.parallels.desktop.launchdaemon.plist &>/dev/null
fi
if [ -f "/var/run/prl_*" ]; then
rm -f "/var/run/prl_*"
fi
fi
echo "[*] 完成停止 Parallels Desktop 主程序"
license_file="/Library/Preferences/Parallels/licenses.json"
if [ -f "$license_file" ]; then
chflags -R 0 "$license_file"
rm -f "$license_file"
fi
exit 0