B
B
bobo_mix2014-01-31 14:44:09
Sphinx
bobo_mix, 2014-01-31 14:44:09

How to configure automatic restart of existing sphinx indexes?

How to configure automatic restart of existing sphinx indexes? who solved a similar problem please share your experience. Thanks in advance! OS Linux

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Gornostaev, 2014-02-01
@bobo_mix

$ crontab -l
0 * * * *       /path/to/sphinx/indexer.sh
*/5 * * * *     /path/to/sphinx/searchd.sh

#!/bin/sh

/usr/bin/indexer --config /path/to/sphinx/sphinx.conf --all --rotate > /dev/null

#!/bin/sh

runing=`ps ax | grep "searchd" | grep -v "grep" | wc -l`

if [ $runing -eq 0 ]; then
    /usr/bin/searchd --config /path/to/sphinx/sphinx.conf
fi

R
Rpsl, 2014-01-31
@Rpsl

Cron

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question