From dc233bb393f9cf3e515c15079d21d7a29fcd93a8 Mon Sep 17 00:00:00 2001 From: Elliot Jordan Date: Fri, 5 Jul 2024 14:16:24 -0700 Subject: [PATCH] Use $appPath variable and quote `whoami` output --- uninstall.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/uninstall.sh b/uninstall.sh index 15a96f8..8133a78 100755 --- a/uninstall.sh +++ b/uninstall.sh @@ -24,7 +24,7 @@ bundleID="com.jamf.setupmanager" appPath="/Applications/Utilities/${appName}.app" -if [ $(whoami) != "root" ]; then +if [ "$(whoami)" != "root" ]; then echo "needs to run as root!" exit 1 fi @@ -35,7 +35,7 @@ if launchctl list | grep -q "$bundleID" ; then fi echo "removing files" -rm -rfv /Applications/Utilities/"$appName".app +rm -rfv "$appPath" rm -v /Library/LaunchDaemons/"$bundleID".plist pkgutil --forget "$bundleID"