Re: Launch agent runs as root immediately after install
site_archiver@lists.apple.com Delivered-To: installer-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:mime-version:in-reply-to :references:content-type:message-id:content-transfer-encoding:from :subject:date:to:x-mailer; bh=dILLDE10T9rww3bPR7tHmjBJZTahQ2IUcNEHbQOY2Xg=; b=qnzRsDZ3MJO71PQeife8gYJ7/OLPOxZMRcycugV+TyCzTBt/uRAfl5E+hbhuFOv3J5 QwLczZ8zcIAfnUOYWU8LopSVG6672ZOX3ciHfq74yPH5ddUK/81IbRVP1CyR01x89get /OXT6XNp9ukgsbVeULpvtROLdBBTw08LGwYLw= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:content-type:message-id :content-transfer-encoding:from:subject:date:to:x-mailer; b=xYcF9xuvakqA6ekdWCoGuBOZOyac2sO8Mw33ZZdgePOnzgqtw093qXIXAZbQvTdKt+ jVnkS5DHeyqC9g91crA3OQxXgwJKb4wGtZcqdofg1xZKtM4IXTwD+b5WmDA3YBZpSloq Uy4YnfifeQzh6eu9s+l0OAxboO/vLr58jFq80= On Mar 19, 2010, at 10:58 AM, Chris Adamson wrote: su $USER -c "launchctl load -S Aqua /Library/LaunchAgents/..." _______________________________________________ Do not post admin requests to the list. They will be ignored. Installer-dev mailing list (Installer-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/installer-dev/site_archiver%40lists.a... We're installing a LaunchAgent that we want to get up and running immediately, so in a post-install script, we call "launchctl load / Library/LaunchAgents/path.to.our.agent.plist". I've noticed that this runs the agent as root, whereas the agent will run as the user on subsequent logins. Is there a way to get the agent running as the user who's performing the install, rather than root? As for the discussion regarding whether a user is logged in or not, if no users are logged in, you're probably performing the installation not through Installer.app so checking the environment var for a command line install should be enough. This email sent to site_archiver@lists.apple.com
participants (1)
-
Iceberg-Dev