#!/bin/sh

# $Id: postflight,v 1.1 2005/09/21 02:08:43 phaddad Exp $

# Script used by Razer PRO installer to install the daemon as a SystemLoginItem.
# This will remove the launchd agent for pre-Leopard systems and remove the
# SystemLoginItem daemon app for Leopard and later

vers=`/usr/bin/sw_vers -productVersion`
case "$vers" in
   10.[34].*)
      "$PACKAGE_PATH"/Contents/Resources/DaemonInstaller
      rm /Library/LaunchAgents/com.razer.DeathAdder.Daemon.plist
      rm -R /Library/PrivilegedHelperTools/RazerDeathAdderDaemon.app
   ;;
   *)
      rm -R /Library/Application\ Support/Razer/RazerDeathAdderDaemon.app
   ;;
esac

exit 0