From: Sergey Kobzar <sergey.kobzar@mail.ru>
To: gentoo-user-ru@lists.gentoo.org
Subject: Re: [gentoo-user-ru] Re: [gentoo-user-ru] Два инстанса Sphinx
Date: Thu, 06 Jun 2013 18:16:56 +0300 [thread overview]
Message-ID: <51B0A7E8.7080403@mail.ru> (raw)
In-Reply-To: <CABKELyx-HEOGh6Yi8_z_1+FV5C8gr+ON7U5o0_P33+mSpVrf_g@mail.gmail.com>
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
?
next prev parent reply other threads:[~2013-06-06 15:17 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 [this message]
2013-06-06 17:23 ` [gentoo-user-ru] " Андрей Буров
2013-06-06 18:54 ` [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=51B0A7E8.7080403@mail.ru \
--to=sergey.kobzar@mail.ru \
--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