Skip to content

Add specjour listen to your boot

pierreozoux edited this page Nov 5, 2012 · 4 revisions

Mac OS

Put this file here : /Library/LaunchDaemons/specjour_listen.plist

<?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>Label</key>
    <string>specjour_listen</string>
    <key>ProgramArguments</key>
    <array>
        <string>bundle</string>
        <string>exec</string>
        <string>specjour</string>
        <string>listen</string>
    </array>
    <key>KeepAlive</key>
    <true/>
    <key>EnvironmentVariables</key>
      <dict>
        <key>PATH</key>
        <string>everything that is in echo $PATH</string>
        <key>HOME</key>
        <string>YourHomePath</string>
      </dict>
    <key>RunAtLoad</key>
    <true/>
    <key>WorkingDirectory</key>
    <string>/your/project/directory/</string>
    <key>UserName</key>
    <string>YourUserName</string>
    <key>debug</key>
    <true/>
</dict>
</plist>

Don't forget to replace YourUserName, YourHomePath, EnvironmentVariables and WorkingDirectory. It is an example with bundle exec.

After that, install it : sudo launchctl load /Library/LaunchDaemons/specjour_listen.plist

Gentoo

Add this to the following file /etc/local.d/specjour.start:

#!/bin/bash
sudo -biu YourUser bash -c 'cd /your/project/directory/ ; bundle exec specjour listen >> /your/project/directory/log/specjour.log 2>&1'
Clone this wiki locally