Skip to content

Instantly share code, notes, and snippets.

@dyng
Created December 14, 2014 03:47
Show Gist options
  • Save dyng/c62cce07d076886b0768 to your computer and use it in GitHub Desktop.
Save dyng/c62cce07d076886b0768 to your computer and use it in GitHub Desktop.
A launchd plist for custom shell script
<!-- http://stackoverflow.com/questions/6442364/running-script-upon-login-mac/13372744#13372744 -->
<!-- Place me at ~/Library/LaunchAgents/com.user.loginscript.plist -->
<?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>com.user.loginscript</string>
<key>Program</key>
<string>/path/to/executable/script.sh</string>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment