diff --git a/MakeMeAnAdmin.sh b/MakeMeAnAdmin.sh index 5c2a54f..cb45678 100644 --- a/MakeMeAnAdmin.sh +++ b/MakeMeAnAdmin.sh @@ -35,7 +35,7 @@ sudo defaults write /Library/LaunchDaemons/removeAdmin.plist Label -string "remo #Add program argument to have it run the update script sudo defaults write /Library/LaunchDaemons/removeAdmin.plist ProgramArguments -array -string /bin/sh -string "/Library/Application Support/JAMF/removeAdminRights.sh" -#Set the run inverval to run every 7 days +#Set the run interval to 30 minutes sudo defaults write /Library/LaunchDaemons/removeAdmin.plist StartInterval -integer 1800 #Set run at load @@ -78,9 +78,9 @@ if [[ -f /private/var/userToRemove/user ]]; then echo "Removing $userToRemove's admin privileges" /usr/sbin/dseditgroup -o edit -d $userToRemove -t user admin rm -f /private/var/userToRemove/user - launchctl unload /Library/LaunchDaemons/removeAdmin.plist rm /Library/LaunchDaemons/removeAdmin.plist log collect --last 30m --output /private/var/userToRemove/$userToRemove.logarchive + launchctl remove removeAdmin fi EOF