In my experience folks who run managed sites really like installer packages, because MDM systems are good at running those. So, one option here is to repackage your app as an installer package,
no problem there. but it really doesn't matter technically if the solution is triggered by a script run during PKG installation or if the script is embedded in the app and the MDM admin calls it in some other way
and have the installer package install the daemon like it would any other launchd daemon
should not matter if the daemon is installed via a PKG or by a script run as root, right?
that is, copy the launchd property list file to /Library/LaunchDaemons.
this finally sounds like a solution, great and THANKS.
i was not aware that SMAppService actually supports daemons installed outside the app, as the documentation always mention they stay embedded in the app.
however and in any case, i tried your solution, but it did not work. the plist can be copied to LaunchDaemons but cannot be loaded into launchd
steps to reproduce:
• i made a copy of the PLIST file that points to the app via an absolute instead of a relative path (attached as com.corecode.MacUpdaterPrivilegedInstallHelperTool2_MDM.plist )
• i modified the installation script (attached as priviledgedHelperTool_install.sh ) to install the plist file to /Library/LaunchDaemons but it cannot be activated either via launchctl or just by rebooting or via the LaunchControl guy. launchctl gives the same uninformative "Bootstrap failed: 5: Input/output error" error that i mentioned in my initial report.
• since the daemon cannot be bootstrapped, the app cannot communicate with the helper
so, we are still at the beginning. how to install the SMAppService based helper daemon non-interactively?
thanks!
note: this content was sent private to DTS on 12. February as part of a TSI. since i have still not received a reply there i'll repost here instead.
attachment 'priviledgedHelperTool_install.sh': https://pastebin.com/QurSFjUT
attachment: 'com.corecode.MacUpdaterPrivilegedInstallHelperTool2_MDM.plist': https://pastebin.com/cZCPWZhf