Re: User for startupitem.executable

2016-09-20 Thread Javier Alcázar
The asterisk example wouldn't work here because it depends on the executable supporting being run as a different user. The -U option. Thank you anyway Ken. Although the mongo example using sudo launches an additional process, it works because daemondo and in turn launchd monitors the whole th

Re: User for startupitem.executable

2016-09-18 Thread Rainer Müller
On 2016-09-17 17:12, Javier Alcázar wrote: > I'm creating a new Portfile with startupitem.executable, and wondering > what is the best way to execute the command with a specific user. Just for the future, Portfile development is usually discussed on macports-dev, where you would reach more develop

Re: User for startupitem.executable

2016-09-17 Thread Ken Cunningham
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 discuss

User for startupitem.executable

2016-09-17 Thread Javier Alcázar
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