MacOSUpgradeHooks
macOS Upgrade Hooks: Execute a script when an OS update or upgrade has started, completed, or migrated
Install / Use
/learn @kennyb-222/MacOSUpgradeHooksREADME
macOSUpgradeHooks
Did you know that you can have macOS run a script whenever you update or upgrade the system? Well... you can't. But you can if you adopt "Upgrade Hooks" for macOS. An upgrade hook tells macOS to execute a script when an OS update or upgrade has started, completed, or migrated.
With an upgrade hook:
- The upgrade hook will be run as root
- Executes when the following events occur:
- Staged upgrade (OS upgrade/update is staged and pending restart)
- Upgrade completion (OS update/upgrade has finished and the loginwindow is loaded)
- templateMigrator completed (automated user login in after the update/upgrade is complete)
- Upgrade actions will not wait until the hook has completely executed
How to setup your upgrade hooks
Input your script code info the following functions that you would like to be called during each event.
The customizable events are PreUpgrade, PostUpgrade, and MigrationComplete
How to install macOS upgrade hooks
sudo /bin/bash /path/to/macOSUpgradeHooks.sh
How to uninstall
sudo /private/var/db/.AppleUpgradeHooks.sh "uninstall"
Notes
Tested on both major (10.14.x - 10.15.x) and minor (10.15 - 10.15.x) macOS release updates
Related Skills
node-connect
341.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
341.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.4kCommit, push, and open a PR
