MAC-004 · Script
Deploy App from URL
Downloads an app installer from the vendor's own https link, checks its SHA-256 hash and Apple Developer Team ID, and installs it silently. Supports .pkg, .dmg (containing an .app or .pkg) and .zip. Skips the install when the app is already at or above --min-version. You supply the vendor link; Runbookia does not include or host any installer.
What it does
Downloads an app installer from the vendor's own https link, checks its SHA-256 hash and Apple Developer Team ID, and installs it silently. Supports .pkg, .dmg (containing an .app or .pkg) and .zip. Skips the install when the app is already at or above --min-version. You supply the vendor link; Runbookia does not include or host any installer.
Requirements
macOS 12 or later, run as root (MDM or RMM default). No prompts.
How to run it
- Run as: root (sudo in Terminal, or your MDM default)
- Run from: any MDM or RMM, a LaunchDaemon, or Terminal with sudo
- Script type: shell script (bash)
- User interaction: none; the script never prompts
- Timeout: 10 minutes (longer for app or update installs)
Settings
| Name | What it does | Options | Default |
|---|---|---|---|
| url | required | required | |
| sha256 | recommended; required unless --team-id is set | ||
| team-id | recommended; 10-character Apple Team ID | ||
| type | default auto, from the file name | auto, pkg, dmg, zip | auto |
| app-name | used for the version check and dmg/zip copy | ||
| min-version | skip when installed version is this or newer |
Exit codes
- 0 = Installed, or already up to date
- 2 = Script error or verification failed (nothing installed)
Testing steps
- Run it on one test device and check the output and log.
- Check the exit code: 0 = OK, 1 = needs attention, 2 = error (see log), 9 = this copy is past its Valid until date.
- Roll out to a small group next, then everyone.
Rollback steps
Delete the app from /Applications. For package installs, use the vendor's uninstaller.
Version and change log
| Version | Date | Changes |
|---|---|---|
| 1.0.0 | November 2026 | First release. |