public inbox for gentoo-user-ru@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Андрей Буров" <burik666@gmail.com>
To: "gentoo-user-ru@lists.gentoo.org" <gentoo-user-ru@lists.gentoo.org>
Subject: [gentoo-user-ru] Re: [gentoo-user-ru] Re: [gentoo-user-ru] Два инстанса Sphinx
Date: Thu, 6 Jun 2013 21:23:29 +0400	[thread overview]
Message-ID: <CABKELyweY0GkbdjDsh6c-fyQH8hgVt4x573kPKVbJRw=3FW8hQ@mail.gmail.com> (raw)
In-Reply-To: <51B0A7E8.7080403@mail.ru>

[-- Attachment #1: Type: text/plain, Size: 3763 bytes --]

Для первого у Вас должно быть
start-stop-daemon --stop --pidfile /run/searchd-first.pid
для второго:
start-stop-daemon --stop --pidfile /run/searchd-second.pid

start-stop-daemon --stop --exec /usr/bin/searchd и должен убивать
Все searchd


2013/6/6 Sergey Kobzar <sergey.kobzar@mail.ru>

> On 06/06/13 10:02, Андрей Буров wrote:
>
>> Доброго времени суток
>> Поменяйте в скриптах:
>> start:
>> start-stop-daemon --start --make-pidfile --pidfile
>> /var/run/sphinx-test.pid --exec /usr/bin/searchd -- --config
>> /etc/sphinx/sphinx-test.conf
>>
>> stop:
>> start-stop-daemon --stop --pidfile /var/run/sphinx-test.pid
>>
>
> Сделал. Все-равно /etc/init.d/searchd stop останавливает 2 процесса.
>
> После старта (запускаются демоны разными скриптами):
> 21467 ?        S      0:00 /usr/bin/searchd
> 21468 ?        Sl     0:00 /usr/bin/searchd
> 21485 ?        S      0:00 /usr/bin/searchd --config
> /etc/sphinx/sphinx-test.conf
> 21486 ?        Sl     0:18 /usr/bin/searchd --config
> /etc/sphinx/sphinx-test.conf
>
>
> Оригинальный скрипт /etc/init.d/searchd:
> #!/sbin/runscript
> # Copyright 1999-2004 Gentoo Foundation
> # Distributed under the terms of the GNU General Public License v2
> # $Header: /var/cvsroot/gentoo-x86/app-**misc/sphinx/files/searchd.rc,v
> 1.1 2009/11/05 15:41:56 graaff Exp $
>
>
> depend() {
>         need net
>         use logger
> }
>
> checkconfig() {
>         if [ ! -f /etc/sphinx/sphinx.conf ] ; then
>                 eerror "Please create /etc/sphinx/sphinx.conf"
>
>                 eerror "Sample conf: /etc/sphinx/sphinx.conf.dist"
>                 return 1
>         fi
>         return 0
> }
>
> start() {
>         checkconfig || return $?
>
>         ebegin "Starting sphinx searchd"
>         start-stop-daemon --start --exec /usr/bin/searchd
>         eend $? "Failed to start sphinx searchd"
> }
>
> stop() {
>         ebegin "Stopping sphinx searchd"
>         start-stop-daemon --stop --exec /usr/bin/searchd
>         eend $? "Failed to stop sphinx searchd"
> }
>
> Скрипт для второго инстанса /etc/init.d/searchd-test:
> #!/sbin/runscript
>
>
>
> depend() {
>         need net
>         use logger
> }
>
> checkconfig() {
>         if [ ! -f /etc/sphinx/sphinx-test.conf ]; then
>                 eerror "Please create /etc/sphinx/sphinx-test.conf"
>                 eerror "Sample conf: /etc/sphinx/sphinx.conf.dist"
>                 return 1
>         fi
>         return 0
> }
>
> start() {
>         checkconfig || return $?
>
>         ebegin "Starting sphinx searchd"
>         start-stop-daemon --start --make-pidfile --pidfile
> /run/searchd-test.pid --exec /usr/bin/searchd -- --config
> /etc/sphinx/sphinx-test.conf
>
>         eend $? "Failed to start sphinx searchd"
> }
>
> stop() {
>         ebegin "Stopping sphinx searchd"
>         start-stop-daemon --stop --pidfile /run/searchd-test.pid
>
>         eend $? "Failed to stop sphinx searchd"
> }
>
>
> Может первому первому скрпту надо сказат --make-pidfile --pidfile
> /run/searchd-test.pid?
>
> Кстати, а зачем --make-pidfile, если демон сам их создает:
>
> # cat /etc/sphinx/sphinx.conf | grep pid
>         pid_file        = /run/searchd.pid
>
> # cat /etc/sphinx/sphinx-test.conf | grep pid
>         pid_file        = /run/searchd-test.pid
>
> ?
>
>


-- 
Andrey Burov aka burik666
ICQ: 262631594
http://burik666.org

[-- Attachment #2: Type: text/html, Size: 5360 bytes --]

  reply	other threads:[~2013-06-06 17:23 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-05 22:32 [gentoo-user-ru] Два инстанса Sphinx Sergey Kobzar
2013-06-06  7:02 ` [gentoo-user-ru] " Андрей Буров
2013-06-06 15:16   ` Sergey Kobzar
2013-06-06 17:23     ` Андрей Буров [this message]
2013-06-06 18:54       ` [gentoo-user-ru] Re: [gentoo-user-ru] " Sergey Popov
2013-06-06 19:10         ` [gentoo-user-ru] " Taz
2013-06-06 19:35         ` Sergey Kobzar
2013-06-07  6:22           ` [gentoo-user-ru] " Sergey Popov
2013-06-07  6:23             ` [gentoo-user-ru] " Sergey Popov
2013-06-07  8:28               ` [gentoo-user-ru] " Sergey Kobzar
2013-06-07 12:44                 ` Sergey Kobzar
2013-06-08 11:39                   ` Sergey Popov
2013-06-09 22:01                     ` Sergey Kobzar
2013-06-10  1:32                       ` [gentoo-user-ru] " Голубев Александр
2013-06-10  8:20                         ` Sergey Kobzar
2013-06-10 20:29                           ` Sergey Kobzar
2013-06-13 11:44                             ` Sergey Kobzar
2013-06-13 17:36                               ` Sergey Popov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CABKELyweY0GkbdjDsh6c-fyQH8hgVt4x573kPKVbJRw=3FW8hQ@mail.gmail.com' \
    --to=burik666@gmail.com \
    --cc=gentoo-user-ru@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox