Files
ProxyPilot/scripts/macos/uninstall-cliproxyapi-launchagent.sh

21 lines
454 B
Bash

#!/usr/bin/env bash
set -euo pipefail
if [[ "$(uname -s)" != "Darwin" ]]; then
echo "launchd autostart is macOS-only." >&2
exit 1
fi
label="com.cliproxyapi"
plist_path="$HOME/Library/LaunchAgents/${label}.plist"
uid="$(id -u)"
if [[ -f "$plist_path" ]]; then
launchctl bootout "gui/${uid}" "$plist_path" >/dev/null 2>&1 || true
rm -f "$plist_path"
echo "Removed LaunchAgent: $plist_path"
else
echo "LaunchAgent not found: $plist_path"
fi