Created
May 28, 2014 10:04
-
-
Save airblade/d8bb2d1d093810aa7a42 to your computer and use it in GitHub Desktop.
Upstart config for sphinx (sphinxsearch) v2.2.4.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 /usr/share/doc/sphinxsearch/ directory." | |
exit 0 | |
fi | |
end script | |
exec /usr/bin/searchd --nodetach |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment