Last active
April 19, 2016 18:59
-
-
Save nheinric/9107715 to your computer and use it in GitHub Desktop.
Hubot .plist for running via launchctl on OSX
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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>KeepAlive</key> | |
<true/> | |
<key>Label</key> | |
<string>com.nheinric.hubot</string> | |
<!-- LSEnvironment does not work for PATH. I don't know why. | |
https://developer.apple.com/library/ios/documentation/general/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html#//apple_ref/doc/uid/20001431-106825 | |
--> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/bin/sh</string> | |
<string>-c</string> | |
<string>export PATH=/usr/local/bin:/usr/local/Cellar/ruby/2.1.0/bin/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin; /Users/nheinric/workspace/hubot/go.sh</string> | |
</array> | |
<key>RunAtLoad</key> | |
<true/> | |
<key>WorkingDirectory</key> | |
<string>/Users/nheinric/workspace/hubot</string> | |
</dict> | |
</plist> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for sharing!
I suspect the /bin/sh and -c are redundant assuming go.sh file has global execute permission and begins with #!/bin/sh ... Also I think the export PATH=... is probably not required either. If you needed to modify default PATH you could put the export PATH statement inside go.sh