Jump to content

Sphinx config


Recommended Posts

http://community.invisionpower.com/resources/documentation/index.html/_/tutorials/large-communities/setting-up-sphinx-r181
Says

Finally, in case you restart your server, you want to make sure that Sphinx is started back up when the server starts. The method of doing this will vary from system to system, so contact your system administrator if you are unsure. We generally use on CentOS the following:



nano /etc/init.d/rc.local

and add to the file

rm -f /var/sphinx/*.spl

/usr/local/bin/searchd --config /path/to/sphinx.conf

My file looks this (Debian Lenny)


#! /bin/sh

### BEGIN INIT INFO

# Provides:          rc.local

# Required-Start:    $remote_fs

# Required-Stop:

# Default-Start:     2 3 4 5

# Default-Stop:

# Short-Description: Run /etc/rc.local if it exist

### END INIT INFO



PATH=/sbin:/usr/sbin:/bin:/usr/bin


. /lib/init/vars.sh

. /lib/lsb/init-functions


do_start() {

        if [ -x /etc/rc.local ]; then

                [ "$VERBOSE" != no ] && log_begin_msg "Running local boot scripts (/etc/rc.local)"

                /etc/rc.local

                ES=$?

                [ "$VERBOSE" != no ] && log_end_msg $ES

                return $ES

        fi

}


case "$1" in

    start)

        do_start

        ;;

    restart|reload|force-reload)

        echo "Error: argument '$1' not supported" >&2

        exit 3

        ;;

    stop)

        ;;

    *)

        echo "Usage: $0 start|stop" >&2

        exit 3

        ;;

esac



Do i put that code after that "esac"?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...