Running Solr under Daemontools
Daemontools: http://cr.yp.to/daemontools.html
Taken from http://markmail.org/message/s7ttlib253l2fyha
- 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.3.0/example exec setuidgid solr java -jar start.jar
5. create /etc/solr/log/run containing:
#!/bin/sh exec setuidgid solr multilog t ./main
6. 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).