Knowledgebase
Uninstalling the 2X Mac Client
Posted by Ryan Pope on 15 February 2010 08:17 PM

To completely uninstall the 2X Mac Client, please use the following script to remove all components below.

If you get a permission error, use this path to change your permissions: "chmod 755 /path/to/file/Uninstall 2XClient.command". You may then re-run the script.

Script:

#!/bin/sh

################################################################################
#  2X Client Uninstaller
# Copyright (c) 2010 2X Software Ltd. All rights reserved.
################################################################################


TUX_CLIENT_LOC="/Applications/2X Client.app"
TUX_CLIENT_SUPPORT_LOC="/Library/Application Support/2X"
TUX_CLIENT_INTPLUGIN_LOC="/Library/Internet Plug-Ins/2XClient.plugin"
TUX_CLIENT_CMDTOOL_LOC="/usr/bin/2xclient"
TUX_CLIENT_RECEIPT_PRE106_LOC="/Library/Receipts/2X Client.pkg"
TUX_CLIENT_RECEIPT_LOC1="/private/var/db/receipts/com.2X.pkg.2XClient.bom"
TUX_CLIENT_RECEIPT_LOC2="/private/var/db/receipts/com.2X.pkg.2XClient.plist"

TUX_CLIENT_PREFS="com.2X.ClientHelper"
TUX_CLIENT_HELPER_PREFS="com.2X.ClientLauncher"
 
Uninstall()
{
 sudo -p "Please enter your password to Uninstall 2X Client:" echo ""
 if [ ! $? = 0 ]; then
  return 1
 fi

 OS_VERSION=`sw_vers | sed -n 's/ProductVersion:[[:space:]]*//p'`
 if [ "$OS_VERSION" \< "10.6" ]; then
  echo "Removing ${TUX_CLIENT_RECEIPT_PRE106_LOC}"
  sudo rm -Rf "${TUX_CLIENT_RECEIPT_PRE106_LOC}"  2>/dev/null
 else
  echo "Removing Installer Receipt"
  sudo rm -f "${TUX_CLIENT_RECEIPT_LOC1}"  2>/dev/null
  sudo rm -f "${TUX_CLIENT_RECEIPT_LOC2}"  2>/dev/null
 fi

 echo "Removing ${TUX_CLIENT_CMDTOOL_LOC}"
 sudo rm -f "${TUX_CLIENT_CMDTOOL_LOC}"  2>/dev/null

 echo "Removing ${TUX_CLIENT_LOC}"
 sudo rm -Rf "${TUX_CLIENT_LOC}"  2>/dev/null

 echo "Removing ${TUX_CLIENT_SUPPORT_LOC}"
 sudo rm -Rf "${TUX_CLIENT_SUPPORT_LOC}"  2>/dev/null

 echo "Removing ${TUX_CLIENT_INTPLUGIN_LOC}"
 sudo rm -f "${TUX_CLIENT_INTPLUGIN_LOC}"  2>/dev/null

 echo "Removing 2X Client Preferences"
 defaults delete "${TUX_CLIENT_PREFS}"  2>/dev/null
 defaults delete "${TUX_CLIENT_HELPER_PREFS}"  2>/dev/null

 return 0
}

echo ===========================================================
echo
Uninstall
result=$?

if [ ! $result = 0 ]; then
 echo 2X Client uninstallation FAILED
else
 echo 2X Client uninstallation SUCCEEDED
fi

echo ===========================================================
echo

(1 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments: