Files

18 lines
543 B
Bash
Executable File

#!/bin/bash
PLIST_NAME="com.adolforeyna.companionclient.plist"
TARGET_PLIST="${HOME}/Library/LaunchAgents/${PLIST_NAME}"
echo "=== Uninstalling Desktop Companion LaunchAgent ==="
if [ -f "${TARGET_PLIST}" ]; then
echo "Stopping and unloading the service..."
launchctl bootout gui/$(id -u) "${TARGET_PLIST}" 2>/dev/null
launchctl unload "${TARGET_PLIST}" 2>/dev/null
echo "Removing plist configuration..."
rm "${TARGET_PLIST}"
echo "Service successfully uninstalled!"
else
echo "Service is not installed."
fi