Skip to content

Instantly share code, notes, and snippets.

@airblade
Created May 28, 2014 10:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save airblade/d8bb2d1d093810aa7a42 to your computer and use it in GitHub Desktop.
Save airblade/d8bb2d1d093810aa7a42 to your computer and use it in GitHub Desktop.
Upstart config for sphinx (sphinxsearch) v2.2.4.
# 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