-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Script Doesnt Remove the LaunchDaemon? #11
Comments
This line causes the removeAdmin.sh to terminate and the actions after it don't happen which include the log collection and the removal of the LaunchDaemon. Just move this line to be 2 lines lower than it is so the removal happens and add a line to remove the removeAdmin.sh file too. That's what I found anyway.
|
On 12.x putting this after the rm -rf /Library/LaunchDaemons/removeAdmin.plist will prevent the launchdaemon from unloading. file or folder not found error. |
Replacing the end of the MakeMeAnAdmin script (the part that creates the local removal script) with what is below has helped ensure logs are properly created and the files used for the privilege changes are removed when the script finishes, including the script itself:
|
I have noticed that this script doesnt
-The script doesn't remove the 'removeAdmin.plist' LaunchDaemon properly. If you look in /Library/LaunchDaemons after it runs, the plist is NOT removed - even though the script is written to remove it. It gets UNLOADED fine - but not removed.
-The script doesn't remove itself (removal script that gets generated in /Library/Application Support/JAMF). So I have a step to delete it if it already exists prior to continuing. This is to prevent an older, outdated version from running (or there are conflict swith an existing file etc).
The text was updated successfully, but these errors were encountered: