Sha256: bc2d1addf9e5b1abda97c536a0cb0c41966bb6f98326287049af80dc5d132222
Contents?: true
Size: 1.11 KB
Versions: 7
Compression:
Stored size: 1.11 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_bin_path %>/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
7 entries across 7 versions & 2 rubygems