Re: How can I "un-sudo" in postflight?
Re: How can I "un-sudo" in postflight?
- Subject: Re: How can I "un-sudo" in postflight?
- From: Stephane Sudre <email@hidden>
- Date: Tue, 03 Dec 2013 14:14:59 +0100
Other possible solution for Mac OS X 10.7 and later:
/bin/launchctl asuser $DESIRED_UID /bin/launchctl load -S Aqua pathto.plist
And yes, the asuser option is still apparently not documented…
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/launchctl.1.html
On Mon, Dec 2, 2013 at 8:40 PM, Mitchell J Laurren-Ring
<email@hidden> wrote:
> I've recently added a launchd plist to my installer and need to load it during postflight (which is running as root). For it to work correctly (as a launch agent), I need to execute launchctl as the current user, not root. I tried using "sudo -u $SUDO_USER" but apparently this ENV variable is set to "launchctl" at postflight time.
>
> How do execute something from postflight as "not root", preferably the installing user?
>
>
> /Mick
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Installer-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
--
Packaging Resources - http://s.sudre.free.fr/Packaging.html
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden