octopusci tentacle LaunchAgent for Mac OS X 10.7 Lion
Tired of starting octopusci-tentacle each time you reboot? Use the Mac's built-in launch services to start it! Here's how:
First I will assume that you've installed octopusci as a gem and it is currently showing up when you type gem list
You'll now want to create the rvm wrapper to make sure your environment is as it should be when we have the system start octopusci-tentacles, by doing this: rvm wrapper ruby-1.9.3-p0 rvm octopusci-tentacles
Be sure to replace your ruby version with whatever ruby version you're using, (find out with ruby --version
)
Create the file ~/Library/LaunchAgents/com.octopusci.tentacles.plist Enter the following NOTE Be sure to replace YourUserName with your user name.
<?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>
<false/>
<key>Label</key>
<string>com.octopusci.tentacles</string>
<key>ProgramArguments</key>
<array>
<string>./rvm_octopusci-tentacles</string>
<string>start</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>UserName</key>
<string>YourUserName</string>
<key>WorkingDirectory</key>
<string>/Users/YourUserName/.rvm/bin</string>
<key>StandardErrorPath</key>
<string>/usr/local/var/log/octopusci-tentacles.log</string>
<key>StandardOutPath</key>
<string>/usr/local/var/log/octopusci-tentacles.log</string>
<key>AbandonProcessGroup</key>
<true/>
</dict>
</plist>
Good, now you can let the system know to load this immediately by issuing the following command: launchctl load -w com.octopusci.tentacles.plist
If something goes wrong, you can observe this file: /usr/local/var/log/octopusci-tentacles.log
The most convenient way is to tail
it by doing tail -f /usr/local/var/log/octopusci-tentacles.log
and using launchctl stop, start, unload, load, and so on.
When all else fails stop by irc at #octopusci on irc.freenode.net