Library / macOS

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.

Version 1.0.0Language bashUpdated November 2026

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

NameWhat it doesOptionsDefault
urlrequiredrequired
sha256recommended; required unless --team-id is set
team-idrecommended; 10-character Apple Team ID
typedefault auto, from the file nameauto, pkg, dmg, zipauto
app-nameused for the version check and dmg/zip copy
min-versionskip 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

  1. Run it on one test device and check the output and log.
  2. Check the exit code: 0 = OK, 1 = needs attention, 2 = error (see log), 9 = this copy is past its Valid until date.
  3. 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

VersionDateChanges
1.0.0November 2026First release.