Skip to content

Instantly share code, notes, and snippets.

@ana-cc
Last active December 2, 2020 21:12
Show Gist options
  • Save ana-cc/c9034bb83fa7c4a654ebf17f73ccb98c to your computer and use it in GitHub Desktop.
Save ana-cc/c9034bb83fa7c4a654ebf17f73ccb98c to your computer and use it in GitHub Desktop.
Simple .plst file for running a startup script on MacOS with launchd
<?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">
<!--File goes in $HOME/Library/LaunchAgents/ to run as that user-->
<!--Load with: launchctl load -w startup.plist -->
<plist version="1.0">
<dict>
<key>Label</key>
<string>startup</string>
<key>ProgramArguments</key>
<array>
<string>/Users/ana/startup.sh</string>
</array>
<key>Nice</key>
<integer>1</integer>
<key>RunAtLoad</key>
<true/>
<key>StandardErrorPath</key>
<string>/tmp/startup_ana.err</string>
<key>StandardOutPath</key>
<string>/tmp/startup_ana.out</string>
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment