Gentoo Archives: gentoo-user-ru

From: "Андрей Буров" <burik666@×××××.com>
To: "gentoo-user-ru@l.g.o" <gentoo-user-ru@l.g.o>
Subject: [gentoo-user-ru] Re: [gentoo-user-ru] Два инстанса Sphinx
Date: Thu, 06 Jun 2013 07:02:18
Message-Id: CABKELyx-HEOGh6Yi8_z_1+FV5C8gr+ON7U5o0_P33+mSpVrf_g@mail.gmail.com
In Reply to: [gentoo-user-ru] Два инстанса Sphinx by Sergey Kobzar
1 Доброго времени суток
2 Поменяйте в скриптах:
3 start:
4 start-stop-daemon --start --make-pidfile --pidfile /var/run/sphinx-test.pid
5 --exec /usr/bin/searchd -- --config /etc/sphinx/sphinx-test.conf
6
7 stop:
8 start-stop-daemon --stop --pidfile /var/run/sphinx-test.pid
9
10
11 6 июня 2013 г., 2:32 пользователь Sergey Kobzar <sergey.kobzar@××××.ru>написал:
12
13 > Необходимо на сервере запустить 2 инстанса Sphinx'а. Для первого инстанса
14 > все оставил как есть. Для второго
15 > 1. Поменял порты (сокеты) в /etc/sphinx/sphinx-test.conf
16 > 2. Поменял pid file в /etc/sphinx/sphinx-test.conf
17 > 3. Изменил путь к инlексам в /etc/sphinx/sphinx-test.conf
18 > 4. Переписал немного rc script:
19 >
20 > depend() {
21 > need net
22 > use logger
23 > }
24 >
25 > checkconfig() {
26 > if [ ! -f /etc/sphinx/sphinx-test.conf ]; then
27 > eerror "Please create /etc/sphinx/sphinx-test.conf"
28 > eerror "Sample conf: /etc/sphinx/sphinx.conf.dist"
29 > return 1
30 > fi
31 > return 0
32 > }
33 >
34 > start() {
35 > checkconfig || return $?
36 >
37 > ebegin "Starting sphinx searchd"
38 > start-stop-daemon --start --exec /usr/bin/searchd -- --config
39 > /etc/sphinx/sphinx-test.conf
40 > eend $? "Failed to start sphinx searchd"
41 > }
42 >
43 > stop() {
44 > ebegin "Stopping sphinx searchd"
45 > start-stop-daemon --stop --exec /usr/bin/searchd -- --config
46 > /etc/sphinx/sphinx-test.conf
47 > eend $? "Failed to stop sphinx searchd"
48 >
49 > (добавил " -- --config /etc/sphinx/sphinx-test.conf")
50 >
51 > Стартуют оба инстанса без проблем, но если делаю /etc/init.d/searchd stop,
52 > то стопаются оба инстанса. Пробовал добавлять --pidfile
53 > /run/searchd-test.pid - безрезультатно.
54 >
55 > Any ideas?
56 >
57 >
58
59
60 --
61 Andrey Burov aka burik666
62 ICQ: 262631594
63 http://burik666.org

Replies

Subject Author
Re: [gentoo-user-ru] Re: [gentoo-user-ru] Два инстанса Sphinx Sergey Kobzar <sergey.kobzar@××××.ru>