Use an environment variable in a launchd script
- by sirlancelot
I'm curious if it's possible to specify an envrionment variable in the ProgramArguments portion of a luanchd script on Mac OS X Leopard.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>me.mpietz.MountDevRoot</string>
<key>ProgramArguments</key>
<array>
<string>/bin/sh</string>
<string>$HOME/bin/attach-devroot.sh</string>
<!-- Instead of using...
<string>/Users/mpietz/bin/attach-devroot.sh</string -->
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>