EPM MacOS - EPM package install with an automated deployment using WorkspaceOne/Munki
Symptom
Trying to create a PKG file to use to silently deploy the EPM agents to Macs on MDM.
Install script is running successfully, however, when package it, the install script fails with the following output:
CyberArkEPMInstaller: Could not complete installation on this computer: ExecutionError(executablePath: "/usr/sbin/installer", arguments: Optional(["-pkg", "/usr/local/opt/CyberArkEPM/Install CyberArk EPM.app/Contents/Resources/CyberArkEPM.pkg", "-target", "LocalSystem"]), terminationStatus: 1, errorMessage: Optional("")) The following error also appears in the system log: error 11:49:23.424648-0600 CyberArkEPMInstallerPackageHelper Invalid parents: [(662, "/bin/bash"), (660, "/usr/sbin/installer"), (657, "/usr/local/opt/CyberArkEPM/Install CyberArk EPM.app/Contents/MacOS/CyberArkEPMInstaller"), (656, "/bin/bash"), (652, "/bin/bash"), (650, "/bin/bash"), (649, "/bin/bash"), (648, "/System/Library/PrivateFrameworks/PackageKit.framework/Versions/A/XPCServices/package_script_service.xpc/Contents/MacOS/package_script_service"), (1, "/sbin/launchd")]
Environment
12.0;21.2 SaaS MacOS
Cause
Invoke the install script directly by the MDM, not by the OS package installer.
The JAMF instructions to create a .DMG file could not be used since Munki assumes a .DMG file contains an installable .APP payload that is copied to Applications.
Resolution
Instead, use a .PKG file that copies the CyberArk EPM installation files and install script to /usr/local/opt/CyberArkEPM, then, they invoked the install script with an MDM postinstall command.