Re: Option to execute a command?
site_archiver@lists.apple.com Delivered-To: installer-dev@lists.apple.com 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 (Installer-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/installer-dev/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com
participants (1)
-
Nathan Sims