User for startupitem.executable

Ken Cunningham ken.cunningham.webuse at gmail.com
Sat Sep 17 09:15:09 PDT 2016


Here's a snippet from another port that might help:

startupitem.create      yes
startupitem.netchange   yes
if {[getuid] == 0} {
    startupitem.executable  ${prefix}/sbin/asterisk -d -U asterisk -G asterisk
} else {
    startupitem.executable  ${prefix}/sbin/asterisk -d
}

and there is a discussion in the mailing list about this from years gone by  the might be worth reading if that doesn't happen:
<https://lists.macosforge.org/pipermail/macports-dev/2007-September/002669.html>

Hope this helps.

ken


On 2016-09-17, at 8:12 AM, Javier Alcázar wrote:

> Hi people,
> 
> I'm creating a new Portfile with startupitem.executable, and wondering what is the best way to execute the command with a specific user.
> 
> I tried using "su -c executable args" but with this approach launchd ends up monitoring the "su" process instead of the "executable"
> 
> What would you recommend to do so launchd looks at the "executable" process?
> 
> 
> 
> 
> 
> Cheers
> 
> 
> -- 
> Javier
> _______________________________________________
> macports-users mailing list
> macports-users at lists.macosforge.org
> https://lists.macosforge.org/mailman/listinfo/macports-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-users/attachments/20160917/f217f846/attachment.html>


More information about the macports-users mailing list