Jason Rennie wrote:
On Wed, Aug 13, 2008 at 1:52 PM, Jon Drukman <[EMAIL PROTECTED]> wrote:

Duh.  I should have thought of that.  I'm a big fan of djbdns so I'm quite
familiar with daemontools.

Thanks!


:)  My pleasure.  Was nice to hear recently that DJB is moving toward more
flexible licensing terms.  For anyone unfamiliar w/ daemontools, here's
DJB's explanation of why they rock compared to inittab, ttys, init.d, and
rc.local:

http://cr.yp.to/daemontools/faq/create.html#why

in case anybody wants to know, here's how to run solr under daemontools.

1. install daemontools
2. create /etc/solr
3. create a user and group called solr
4. create shell script /etc/solr/run (edit to taste, i'm using the default jetty that comes with solr)

#!/bin/sh
exec 2>&1
cd /usr/local/apache-solr-1.2.0/example
exec setuidgid solr java -jar start.jar


4. create /etc/solr/log/run containing:

#!/bin/sh
exec setuidgid solr multilog t ./main

5. ln -s /etc/solr /service/solr

that is all. as long as you've got svscan set to launch when the system boots, solr will run and auto-restart on crashes. logs will be in /service/solr/log/main (auto-rotated).

yay.
-jsd-

Reply via email to