Skip to content

Instantly share code, notes, and snippets.

@cooncesean
Last active December 23, 2015 09:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cooncesean/6617008 to your computer and use it in GitHub Desktop.
Save cooncesean/6617008 to your computer and use it in GitHub Desktop.
Sample .plist document to run a shell script at system startup
<!-- STARTS THE `capture_videos` SCRIPT ON STARTUP -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>start-foo</string>
<key>ProgramArguments</key>
<array>
<string>/bin/bash</string>
<string>/Users/username/run_foo.sh</string>
</array>
<key>RunAtLoad</key>
<true />
<key>StandardOutPath</key>
<string>/tmp/plist_start_foo_output.txt</string>
<key>StandardErrorPath</key>
<string>/tmp/plist_start_foo_error.txt</string>
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment