• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: using launchctl in postflight scripts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: using launchctl in postflight scripts


  • Subject: Re: using launchctl in postflight scripts
  • From: Keith Duncan <email@hidden>
  • Date: Tue, 19 Feb 2008 23:57:26 +0000

I need to start both a daemon and agent process using launchctl, but my postinstall/postupgrade scripts run as root.

You can use the environment variables set for the script. My agent preinstall script is given below for example.


Keith


#!/bin/sh

if [ -f /Library/LaunchAgents/dawnAlarma.plist ]; then
su $USER -c 'launchctl unload /Library/LaunchAgents/ com.buoy.dawnAlarma.plist'
fi


_______________________________________________
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


References: 
 >using launchctl in postflight scripts (From: Shaun Wexler <email@hidden>)

  • Prev by Date: using launchctl in postflight scripts
  • Next by Date: Installer Package database questions
  • Previous by thread: using launchctl in postflight scripts
  • Next by thread: Installer Package database questions
  • Index(es):
    • Date
    • Thread