#!/bin/sh

DESTDIR="$HOME/Library/LaunchAgents"

[ -d "$DESTDIR" ] && for service in com.apple.bluetoothautomationbroker.plist com.apple.bluetoothautomation.plist com.apple.BluetoothAutomationAgent.plist; do
	{ launchctl unload -w $DESTDIR/$service 2>&1 | egrep -iq "stat|nothing|Error" ; } || echo "Unregistered BluetoothAutomation service ($service)."
	rm -f $DESTDIR/$service
done
