1 |
Необходимо на сервере запустить 2 инстанса Sphinx'а. Для первого |
2 |
инстанса все оставил как есть. Для второго |
3 |
1. Поменял порты (сокеты) в /etc/sphinx/sphinx-test.conf |
4 |
2. Поменял pid file в /etc/sphinx/sphinx-test.conf |
5 |
3. Изменил путь к инlексам в /etc/sphinx/sphinx-test.conf |
6 |
4. Переписал немного rc script: |
7 |
|
8 |
depend() { |
9 |
need net |
10 |
use logger |
11 |
} |
12 |
|
13 |
checkconfig() { |
14 |
if [ ! -f /etc/sphinx/sphinx-test.conf ]; then |
15 |
eerror "Please create /etc/sphinx/sphinx-test.conf" |
16 |
eerror "Sample conf: /etc/sphinx/sphinx.conf.dist" |
17 |
return 1 |
18 |
fi |
19 |
return 0 |
20 |
} |
21 |
|
22 |
start() { |
23 |
checkconfig || return $? |
24 |
|
25 |
ebegin "Starting sphinx searchd" |
26 |
start-stop-daemon --start --exec /usr/bin/searchd -- --config |
27 |
/etc/sphinx/sphinx-test.conf |
28 |
eend $? "Failed to start sphinx searchd" |
29 |
} |
30 |
|
31 |
stop() { |
32 |
ebegin "Stopping sphinx searchd" |
33 |
start-stop-daemon --stop --exec /usr/bin/searchd -- --config |
34 |
/etc/sphinx/sphinx-test.conf |
35 |
eend $? "Failed to stop sphinx searchd" |
36 |
|
37 |
(добавил " -- --config /etc/sphinx/sphinx-test.conf") |
38 |
|
39 |
Стартуют оба инстанса без проблем, но если делаю /etc/init.d/searchd |
40 |
stop, то стопаются оба инстанса. Пробовал добавлять --pidfile |
41 |
/run/searchd-test.pid - безрезультатно. |
42 |
|
43 |
Any ideas? |