🌟 Overview
This knowledge article explains, step‑by‑step, how to deploy the Liongard macOS agent when you have two files:
The Liongard installer (e.g.,
LiongardAgentInstaller.pkg), andThe Install Script (the bash script from Liongard that must be used with that installer and not standalone).
Key point (do not skip): The Liongard install script is not a standalone installer. It expects the installer binary to be present locally or to be downloaded by the script. If the .pkg is not available to the target Mac (either uploaded to the MDM/RMM as part of the job or hosted on an HTTPS URL the script can reach), installation will fail.
🎯 Goals of this article
Show exact upload & deployment patterns across major MDM / RMM platforms.
Key point (must read)
The install script is to be used with the Liongard Installer and not as a standalone installation script.
The script expects the
.pkginstaller to be present locally on the target Mac or to be downloadable by the script (HTTPS). Deploying only the.shwithout making the.pkgavailable will fail.
💥 Prerequisites
Latest Liongard installer for Mac.
Download our Bash Install Script by right-clicking the page, and selecting "Save As" (wording may vary by browser or OS). Make sure the file extension is
.sh.INSTANCE_URL: Enter the core of your Liongard URL. Do NOT include "https://". Must also be in lowercase letters (Example : us1.app.liongard.com).
ACCESS_KEY_ID: Enter the Access Key ID from your Agent Install Token
ACCESS_KEY_SECRET: Enter the Access Key Secret from your Agent Install Token
Optional Variables
NAME: Liongard will populate this field using the hostname of the device the Agent is being installed on. If the Agent name already exists, Liongard will auto-concatenate a numerical value (in parenthesis) to the new Agent name
ENVIRONMENT: This field is optional, but if skipped the Environment must be assigned in Liongard on the Admin > Agents screen. For more information review our Agent Management documentation.
Admin access to the RMM/MDM console you’ll use.
A staging group of macOS devices to test before full rollout.
🔎 Platforms covered (Top 7 - Most Used RMM/MDM)
Jamf Pro
Addigy
Kandji
Mosyle
SimpleMDM
Microsoft Intune (macOS)
Datto RMM
Note: If your RMM/MDM is not in this list, consult the vendor's support documentation or contact their support team.
🚀 Deployment approaches
Native bundle (recommended): Upload both
.pkgand.shin the same package/policy/object so both files are transferred to the endpoint together and executed in the required order.Script‑host approach: Host the
.pkgon an HTTPS endpoint and deploy only the script, which downloads and runs the.pkgduring execution.Component/package with post‑install script: Create a single signed
.pkgthat contains the agent and runs the configuration script as a post‑install payload.
⚙️ General implementation notes
Ensure correct execution order: If both files are uploaded, make sure the
.pkgis present prior to the script running. Prefer installer first, then runinstall.sh.Use absolute/relative paths appropriately: Confirm how your RMM/MDM exposes uploaded files to scripts (current working directory vs artifact path).
Security: Pass tokens as secure parameters if supported. Avoid leaving secrets on disk.
Idempotency & logging: Make scripts safe to re-run and log outputs to
/var/log/or custom logs. Use proper exit codes for success/failure reporting.
🌍 Platform‑Specific, Actionable Steps + Vendor Links
Each platform below shows the minimal, repeatable steps to upload both the .pkg and the .sh (or, when not possible, the recommended pattern to ensure the .pkg is available to the script at runtime).
1. Jamf Pro
Steps:
Upload
.pkg: Settings → Computer Management → Packages → New → uploadLiongardAgentInstaller.pkg.Upload
.sh: Settings → Computer Management → Scripts → New → paste the Liongardinstall.shand configureINSTANCE_URL,ACCESS_KEY_ID,ACCESS_KEY_SECRET, and optionalNAME/ENVIRONMENTvariables.Create Policy: Computers → Policies → New. Add the Packages payload (select the
.pkg) and the Scripts payload (select the edited script). Set the script to run after the package installation.Scope and Deploy to pilot group, verify installation and Liongard agent registration.
Vendor documentation:
Jamf: Package Uploads in Jamf Pro
2. Addigy
Steps:
Catalog → Software → Add New (Smart Software Item).
Upload files: Add both
LiongardAgentInstaller.pkgandinstall.shinto the Smart Software item.Configure the Install Command to execute the uploaded
install.sh(ensure it references the local file path Addigy uses for artifacts).Assign the Smart Software item to a Policy/Device Group.
Vendor documentation:
3. Kandji (Custom Apps with pre/post install scripts)
Steps:
Library → Add New → Custom App.
Upload the
.pkg(or.dmg/.zip) as the installer payload.Paste the Liongard
install.shinto the Post‑Install Script field so it runs after the installer is available.Assign the Custom App to a Blueprint and deploy.
Vendor documentation:
Kandji: Deploying Custom Apps
Kandji: Custom Apps overview (pre/post install scripts)
4. Mosyle (Custom Commands / hosted‑pkg approach)
Recommended: Mosyle favors hosting the installer or using their package upload + separate Custom Commands. If you cannot upload both files to the same policy, host the .pkg on HTTPS and run a Custom Command to download + run the installer.
Steps:
Upload a
.pkgusing Mosyle's package management if available for your plan (Management → Install PKG → Add New Package).Or host the
LiongardAgentInstaller.pkgon a secure HTTPS location.Create a Custom Command (Management → Custom Commands) that downloads the
.pkg(curl/wget) and usessudo installer -pkgto install it, and then runinstall.shlogic (or includeinstall.shinline in the command).
Vendor documentation / support:
Note: Mosyle's KB often requires login to access detailed step pages. If you need the exact KB article URL, We suggest opening a support ticket with Mosyle and ask for their article on uploading PKG and Custom Commands.
5. SimpleMDM (separate script & package workflows)
Steps:
Upload
.pkgas an app: Apps → Add App → macOS Package → uploadLiongardAgentInstaller.pkgand assign to target devices.Create a Script: Scripts → Create Script → upload/paste
install.sh. Run it as a Job targeted to your devices.If ordering matters, schedule the package assignment first or have the script check for the presence of the
.pkg(or download it) before running the install steps.
Vendor documentation / support:
Note: SimpleMDM treats apps and scripts as separate objects (app assignment vs script job). Combine them by sequencing jobs or having the script download the installer.
6. Microsoft Intune (macOS) — LOB apps + macOS Shell Script
Steps:
Upload
.pkgas a macOS LOB app: Intune portal → Apps → macOS → Add → Line‑of‑business app → uploadLiongardAgentInstaller.pkg.Upload
install.shas a macOS Shell Script: Devices → macOS → Scripts → Add → upload yourinstall.shand configure runtime options.Deployment sequencing: Intune does not bundle scripts inside the app object. Either deploy the installer first and then the script, or have the script download the
.pkgand run it.
Vendor documentation:
Microsoft Intune: LOP Apps
7. Datto RMM (component model — bundle files + script)
Why Datto RMM is useful here: Datto Components allow you to attach files (installers) and a shell script together into a single Component. When the Component is executed as a Job, both the files and the script are transferred to the endpoint and can be executed in sequence.
Steps:
In Datto RMM, create a new Component.
Choose script type: Shell (Unix, macOS) and paste the
install.shcontent.Under Files, click Add File and attach
LiongardAgentInstaller.pkg(or.zip/.dmg). Datto will transfer these files with the component when executed.Create and run a Job using this Component, targeted at the desired devices.
Vendor documentation:
Datto RMM Jobs Overview (component & jobs docs)
🧐 Troubleshooting
Installer not found: The script attempted to execute a local
.pkgthat does not exist. Ensure the file path is correct or change the script to download the package first.Permission errors: Ensure the script runs as a privileged user (sudo) or the RMM/MDM runs scripts as root/system account.
Gatekeeper blocking install: Use MDM to approve the installer if required.
Token / Auth failures: Verify
ACCESS_KEY_IDandACCESS_KEY_SECRETare correct and check connectivity to theINSTANCE_URL.Script fails on idempotency check: Adjust script to handle already installed agent scenario (exit 0 if already present).
📌 Final note
This knowledge article focuses on the most commonly used RMM and MDM platforms, providing direct links to vendor documentation where publicly available. Some vendor knowledge base articles may require sign-in or be restricted to existing customers.
If you need a specific step-by-step guide for a specific vendor, we suggest reaching to the vendor support team directly.
Please note: We are happy to provide our partners with vendor links as an additional resource. Liongard is not liable for the content or accuracy of any third-party resources. We simply want to assist you in navigating the process and kindly remind you to access these links at your own discretion. Thank you for your understanding!
🧑💻 Contact Support
If you have any questions or experience issues, please reach out to Liongard Support. We are happy to assist in anyway possible!