Add Ubuntu 14.04 configuration

This commit is contained in:
Michael RICOIS 2014-08-13 13:55:48 +00:00
parent e86f75adec
commit a039f5fe20
2 changed files with 44 additions and 0 deletions

View File

@ -0,0 +1,10 @@
#
# Settings for the sphinxsearch searchd daemon
# Please read /usr/share/doc/sphinxsearch/README.Debian for details.
#
# Should sphinxsearch run automatically on startup? (default: no)
# Before doing this you might want to modify /etc/sphinxsearch/sphinx.conf
# so that it works for you.
START=yes

View File

@ -0,0 +1,34 @@
# SphinxSearch Service
description "SphinxSearch Daemon"
author "Andrey Aksyonoff <shodan@sphinxsearch.com>"
start on (net-device-up
and local-filesystems
and runlevel [2345])
stop on runlevel [016]
respawn
respawn limit 10 35
# The default of 5 seconds is too low if we have rt indices and have to flush them
kill timeout 30
env DEFAULTFILE="/etc/default/sphinxsearch"
pre-start script
if [ -f "$DEFAULTFILE" ]; then
. "$DEFAULTFILE"
fi
if [ "z$START" != "zyes" ]; then
stop
logger "To enable sphinxsearch, edit /etc/default/sphinxsearch and set START=yes"
exit 0
fi
if [ ! -f /etc/sphinxsearch/sphinx.conf ]; then
logger "Please create an /etc/sphinxsearch/sphinx.conf configuration file."
logger "Templates are in the /etc/sphinxsearch/ directory."
exit 0
fi
end script
exec /usr/local/sphinx/bin/searchd --nodetach --config /etc/sphinxsearch/sphinx.conf