Ok, what I wrote earlier was totally wrong. Here is the correct plist
file, which now works on my system (tested). You need to put this in /
Library/LaunchDaemons

<?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>local.lchc-mini.xmca-resources.sphinx</string>
        <key>ProgramArguments</key>
        <array>
                <string>/usr/local/sphinx/bin/searchd</string>
                <string>--config</string>
                <string>/Users/web/Sites/edu.ucsd.xmca/config/
production.sphinx.conf</string>
                <string>--console</string>
        </array>
        <key>KeepAlive</key>
        <true/>
        <key>RunAtLoad</key>
        <true/>
</dict>
</plist>


-etienne

On Mar 27, 5:20 pm, etienne pelaprat <[email protected]> wrote:
> I forgot to add this only works with Snow Leopard. Haven't tested with
> Leopard.
>
> On Mar 27, 5:19 pm, etienne pelaprat <[email protected]> wrote:
>
>
>
>
>
>
>
> > If you're running your apps on a Mac, you can place use the following
> > plist to start TS when your system boots, and ask launchctl to keep it
> > alive if it fails.  Use the following template, and change the paths
> > where appropriate, and place it in "/Library/LaunchAgents/"
>
> > <?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.host.something.ts-start</string>
> >         <key>ProgramArguments</key>
> >         <array>
> >                 <string>/Users/xxxxx/Sites/your_app/rake</string>
> >                 <string>ts:start</string>
> >         </array>
> >         <key>RunAtLoad</key>
> >         <true/>
> > </dict>
> > </plist>
>
> > -etienne
>
> > On Feb 13, 7:44 pm, Pat Allan <[email protected]> wrote:
>
> > > Hi Mike
>
> > > There's nothing built-in to Thinking Sphinx that does this. I would 
> > > probably create an init.d script that managed this - which could restart 
> > > Apache, Sphinx and Delayed Job. Although really, you should probably 
> > > restart Delayed Job after every deploy (granted, if you're only using it 
> > > for Sphinx, then that's not so important).
>
> > > Of course, there's a difference to Apache restarting and your app 
> > > restarting (ie: touch tmp/restart.txt). If it's the latter, then it might 
> > > be worth writing a rake task that runsts:startand ts:dd, then touches 
> > > tmp/restart.txt.
>
> > > Cheers
>
> > > --
> > > Pat
>
> > > On 09/02/2011, at 8:12 PM, Mike C wrote:
>
> > > > Is there a way to automatically run  rakets:startand rake ts:dd
> > > > whenever my Apache phusion server restarts? Or somehow automate it so
> > > > that each time the server starts up, I have to manually run those
> > > > commands?
>
> > > > --
> > > > You received this message because you are subscribed to the Google 
> > > > Groups "Thinking Sphinx" group.
> > > > To post to this group, send email to [email protected].
> > > > To unsubscribe from this group, send email to 
> > > > [email protected].
> > > > For more options, visit this group 
> > > > athttp://groups.google.com/group/thinking-sphinx?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/thinking-sphinx?hl=en.

Reply via email to