#!/bin/bash

PATH=/bin:/sbin:/usr/bin:/usr/sbin; export PATH

syslog -s -l 4 "AVD uninstallation started"

LADIR="/Library/LaunchDaemons"
PLUGDIR="/Library/Audio/Plug-Ins/HAL"

COMMUNICATOR='com.HairerSoft.Amadeus.Communicator.plist'
DRIVER='AmadeusVirtualDriver.driver'

launchctl unload "$LADIR/$COMMUNICATOR"

rm -f "$LADIR/$COMMUNICATOR"
rm -rf "$PLUGDIR/$DRIVER"

exit 0
