Skip to content

Instantly share code, notes, and snippets.

@jmahlman
Last active April 12, 2019 15:50
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmahlman/71b1ed9986e8503c5938919fffca6399 to your computer and use it in GitHub Desktop.
Save jmahlman/71b1ed9986e8503c5938919fffca6399 to your computer and use it in GitHub Desktop.
depnotify post install script
#!/bin/sh
## postinstall
#!/bin/sh
echo "disable auto updates ASAP" >> /var/log/jamf.log
defaults write /Library/Preferences/com.apple.SoftwareUpdate.plist AutomaticDownload -bool NO
defaults write /Library/Preferences/com.apple.SoftwareUpdate.plist ConfigDataInstall -bool NO
defaults write /Library/Preferences/com.apple.SoftwareUpdate.plist CriticalUpdateInstall -bool NO
defaults write /Library/Preferences/com.apple.commerce.plist AutoUpdateRestartRequired -bool NO
defaults write /Library/Preferences/com.apple.commerce.plist AutoUpdate -bool NO
defaults write /Library/Preferences/com.apple.SoftwareUpdate.plist AutomaticCheckEnabled -bool NO
## Make the main script executable
echo "setting main script permissions" >> /var/log/jamf.log
chmod a+x /var/tmp/com.uarts.DEPprovisioning.facstaff.sh
## Set permissions and ownership for launch daemon
echo "set LaunchDaemon permissions" >> /var/log/jamf.log
chmod 644 /Library/LaunchDaemons/com.uarts.launch.plist
chown root:wheel /Library/LaunchDaemons/com.uarts.launch.plist
## Load launch daemon into the Launchd system
echo "load LaunchDaemon" >> /var/log/jamf.log
launchctl load /Library/LaunchDaemons/com.uarts.launch.plist
exit 0 ## Success
exit 1 ## Failure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment