I need to create a package installer on OS X that handles the installation of two launched daemons: one that runs as root and one that runs as the current user. While this is just for a very small internal deployment, I can make no guarantees as to what the current username is. How can I either:
- Make sure that the latter has the proper username set in the launchd plist file?
OR
- Ensure that each one is setup by the proper invocation of launchctl, one that's using "sudo" and one that's not?