Last active
March 4, 2020 17:45
-
-
Save rtrouton/e390486b0cec895b9fb9b19cf87fa10a to your computer and use it in GitHub Desktop.
Preinstall script for Privileges.app installer package
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# preinstall.sh | |
# Marc Thielemann, 2019/09/15 | |
# redirect all output to /dev/null | |
exec >/dev/null 2>&1 | |
helperPlistPath="$3/Library/LaunchDaemons/corp.sap.privileges.helper.plist" | |
/usr/bin/killall Privileges | |
# unload the launchd plist only if installing on the boot volume | |
if [[ "$3" = "/" ]]; then | |
/bin/launchctl bootout system "$helperPlistPath" | |
fi | |
/bin/rm -rf "$helperPlistPath" \ | |
"$3/Library/PrivilegedHelperTools/corp.sap.privileges.helper" \ | |
"$3/Applications/Privileges.app" | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment