Sha256: 524e4828186cb14ad0f82cdcdb0f1b98e17e3c24ba77665ac3c99d6dbac09558

Contents?: true

Size: 1.12 KB

Versions: 5

Compression:

Stored size: 1.12 KB

Contents

#! /bin/sh
# sphinx: Sphinx search daemon for <%= application %>
#
# chkconfig: - 86 14
# description: sphinx search daemon
# processname: searchd
#
# Author: Gabriel Handford http://ducktyper.com

# Source function library
. /etc/rc.d/init.d/functions

RETVAL=0

DESC="sphinx daemon (<%= application %>)"
NAME=searchd
DAEMON=<%= sphinx_prefix %>/bin/searchd
CONFIGFILE=<%= sphinx_conf_path %>
PIDFILE=<%= sphinx_pid_path %>

start() {
  daemon --user <%= user %> $DAEMON --config $CONFIGFILE
  RETVAL=$?
  echo
  return $RETVAL;  
}

stop() {
  kill -QUIT `cat $PIDFILE` || echo -n " not running"
}

reload() {
  kill -HUP `cat $PIDFILE` || echo -n " can't reload"
}

case "$1" in
  start)
  	echo -n "Starting $DESC: $NAME"
  	start
    RETVAL=$?;
	;;
  stop)
  	echo -n "Stopping $DESC: $NAME"
  	stop
  	RETVAL=$?;
	;;
  reload)
  	echo -n "Reloading $DESC configuration..."
  	reload
  	RETVAL=$?;
  	echo "reloaded."
  ;;
  restart)
  	echo -n "Restarting $DESC: $NAME"
  	stop
  	# Sleep after stop
  	sleep 1
  	start
  	RETVAL=$?;
	;;
  *)
	  echo "Usage: $0 {start|stop|restart|force-reload}" >&2
	  RETVAL=3;
	;;
esac

exit $RETVAL;

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
capitate-0.2.1 lib/templates/sphinx/sphinx_app.initd.centos.erb
capitate-0.2.2 lib/templates/sphinx/sphinx_app.initd.centos.erb
capitate-0.2.3 lib/templates/sphinx/sphinx_app.initd.centos.erb
capitate-0.2.6 lib/templates/sphinx/sphinx_app.initd.centos.erb
capitate-0.2.5 lib/templates/sphinx/sphinx_app.initd.centos.erb