I have created the below script to remove all SMART Notebook software that was installed on a machine
!/bin/bash
Uninstall SMART Products
/Applications/SMART Technologies/SMART Uninstaller.app/Contents/Resources/uninstall --all 2> /dev/null
delete needed files
for USER_HOME in /Users/*
do
USER_UID=basename "${USER_HOME}"
if [ ! "${USER_UID}" = "Shared" ]; then
# Removing preference file from users' ~/Library/Preferences
if [ -f "${USER_HOME}"/Library/Preferences/com.smarttech.gallery.plist ]; then
rm -rf "${USER_HOME}"/Library/Preferences/com.smarttech.gallery.plist 2> /dev/null
fi
# Removing preference file from users' ~/Library/Preferences
if [ -f "${USER_HOME}"/Library/Preferences/com.smarttech.notebook.Notebook.10.LSSharedFileList.plist ]; then
rm -rf "${USER_HOME}"/Library/Preferences/com.smarttech.notebook.Notebook.10.LSSharedFileList.plist 2> /dev/null
fi
# Removing preference file from users' ~/Library/Preferences
if [ -f "${USER_HOME}"/Library/Preferences/com.smarttech.notebook.Notebook.10.plist ]; then
rm -rf "${USER_HOME}"/Library/Preferences/com.smarttech.notebook.Notebook.10.plist 2> /dev/null
fi
# Removing preference file from users' ~/Library/Preferences
if [ -f "${USER_HOME}"/Library/Preferences/com.smarttech.Registry.plist ]; then
rm -rf "${USER_HOME}"/Library/Preferences/com.smarttech.Registry.plist 2> /dev/null
fi
# Removing Hotsport Shield directory from users' ~/Library/Application Support
if [ -d "${USER_HOME}"/Library/Application Support/Smart Technologies ]; then
rm -rf "${USER_HOME}"/Library/Application Support/Smart Technologies 2> /dev/null
fi
# Removing Hotsport Shield directory from users' ~/Library/Application Support
if [ -d "${USER_HOME}"/Library/Application Support/Smart Technologies inc ]; then
rm -rf "${USER_HOME}"/Library/Application Support/Smart Technologies inc 2> /dev/null
fi
fi
done
I added 2> /dev/null trying to prevent the errors but that did nothing. I tried recreating the script with no change. I recreated the policy as well with no change. Every time I run the self service policy I get the following error
015-08-04 12:59:35 <com.jamfsoftware.selfservice>: Error executing Policy "Smart Uninstaller"
Error Domain=JAMFSoftware/SelfService Code=30 "The operation couldn’t be completed. (JAMFSoftware/SelfService error 30.)"
2015-08-04 12:59:35 <com.jamfsoftware.selfservice>: Self Service encountered a problem while attempting to run Smart Uninstaller. Contact your administrator.
Other scripts are running fine just this one is causing me issues
If I run this script from the command line it works fine
Even with it erring out it still works fine
Need some way to suppress the error from Self Service or stop it from happening
Thanks