<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>Here's a snippet from another port that might help:</div><div><br></div><div><div>startupitem.create &nbsp; &nbsp; &nbsp;yes</div><div>startupitem.netchange &nbsp; yes</div><div>if {[getuid] == 0} {</div><div>&nbsp; &nbsp; startupitem.executable &nbsp;${prefix}/sbin/asterisk -d -U asterisk -G asterisk</div><div>} else {</div><div>&nbsp; &nbsp; startupitem.executable &nbsp;${prefix}/sbin/asterisk -d</div><div>}</div></div><div><br></div><div>and there is a discussion in the mailing list about this from years gone by &nbsp;the might be worth reading if that doesn't happen:</div><div>&lt;<a href="https://lists.macosforge.org/pipermail/macports-dev/2007-September/002669.html">https://lists.macosforge.org/pipermail/macports-dev/2007-September/002669.html</a>&gt;</div><div><br></div><div>Hope this helps.</div><div><br></div><div>ken</div><div><br></div><br><div><div>On 2016-09-17, at 8:12 AM, Javier Alcázar wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><div>Hi people,<br></div><div><br></div><div>I'm creating a new Portfile with&nbsp;<font face="monospace, monospace">startupitem.executable</font>, and wondering what is the best way to execute the command with a specific user.</div><div><br></div><div>I tried using "<font face="monospace, monospace">su -c executable args</font>" but with this approach <font face="monospace, monospace">launchd</font>&nbsp;ends up monitoring the "<font face="monospace, monospace">su</font>" process instead of the "<font face="monospace, monospace">executable</font>"<br><br>What would you recommend to do so launchd looks at the "<font face="monospace, monospace">executable</font>" process?</div><div><br><br><br><br></div><div><br></div><div>Cheers</div><div><br></div><div><div><br></div>-- <br><div><div dir="ltr"><span style="font-size:12.8px">Javier</span><br></div></div>
</div></div>
_______________________________________________<br>macports-users mailing list<br><a href="mailto:macports-users@lists.macosforge.org">macports-users@lists.macosforge.org</a><br>https://lists.macosforge.org/mailman/listinfo/macports-users<br></blockquote></div><br></body></html>