Re: Option to execute a command?
Re: Option to execute a command?
- Subject: Re: Option to execute a command?
- From: Nathan Sims <email@hidden>
- Date: Wed, 30 Mar 2011 10:37:57 -0700
On Mar 30, 2011, at 12:14 AM, Per Olofsson wrote:
>> Start by creating a folder named Scripts, and inside create two bash scripts:
>>
>> preinstall:
>>
>>> #!/bin/bash
>>>
>>> LAUNCHD=/Library/LaunchDaemons/edu.caltech.autonomy.foo.plist
>>> if [ -e "$LAUNCHD" ]; then
>>> launchctl unload -w "$LAUNCHD"
>>> fi
>>
>> postinstall:
>>
>>> #!/bin/bash
>>>
>>> launchctl load -w /Library/LaunchDaemons/edu.caltech.autonomy.foo.plist
>>>
>>
>> Then chmod +x preinstall postinstall.
>>
>> Now in your packagemaker project, expand the component choice that you wish to add scripts for under Contents (NB: not the Distribution), and select the sub-package. Switch to the Scripts tab, and select the folder you created as the Scripts directory (leave Preinstall and Postinstall blank). Save and build.
How can I have PackageMaker place the $LAUNCHD plist into the LaunchAgents folder so that launchctl can run it?
_______________________________________________
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