From: "Dmitry V. Levin" <ldv@altlinux.org>
To: ALT Linux Community <community@lists.altlinux.org>
Subject: Re: [Comm] start_daemon и stop_daemon
Date: Thu, 15 Jun 2006 02:27:24 +0400
Message-ID: <20060614222724.GE8552@basalt.office.altlinux.org> (raw)
In-Reply-To: <44900624.6030802@reutman.ru>
[-- Attachment #1: Type: text/plain, Size: 1608 bytes --]
On Wed, Jun 14, 2006 at 04:50:44PM +0400, Alexey Sidorov wrote:
> есть инит-скрипт "обслуживающий" pyicq-t
>
> JIT_CONF=/etc/jabberd2/pyicq.xml
> LOCKFILE=/var/lock/subsys/jabberd2-pyicq
> PIDFILE=/var/lib/jabberd2/pid/pyicq.pid
> JIT_USER=jabberd2
> JIT_EXEC=/usr/libexec/pyicq-t/PyICQt.py
> в start прописано:
> start_daemon \
> --lockfile "$LOCKFILE" \
> --pidfile "$PIDFILE" \
> --user "$JIT_USER" \
> -- "$JIT_EXEC" -b -c "$JIT_CONF"
> RETVAL=$?
> в stop:
> stop_daemon \
> --lockfile "$LOCKFILE" \
> --pidfile "$PIDFILE" \
> --expect-user "$JIT_USER" \
> -- "$JIT_EXEC"
> RETVAL=$?
> и в status:
> status \
> --pidfile "$PIDFILE" \
> --expect-user "$JIT_USER" \
> -- "$JIT_EXEC"
> RETVAL=$?
>
> стартует нормально, а вот стоп - не работает. и статус тоже говорит что процесс "стоппед" (PyICQt.py is stopped)
> мне кажется это из-за того, что при старте PyICQt.py стартует (и впоследствии висит в процессах) python, и он уже в свою очередь запускает pyicqt'шный main
>
> Что нужно прописать в stop_daemon и status что-б они работали?
Как вы понимаете, работающий процесс, который будут искать start_daemon,
stop_daemon и status - это python. Но start_daemon, stop_daemon и status
этого не знают, их нужно проинформировать:
start_daemon --name python
stop_daemon python (python вместо $JIT_EXEC")
status python (python вместо $JIT_EXEC")
Если хотите красоты, до добавьте ещё для каждой из них
--displayname "$JIT_EXEC"
Это всё при условии, что $PIDFILE заполнен правильно.
--
ldv
[-- Attachment #2: Type: application/pgp-signature, Size: 191 bytes --]
next prev parent reply other threads:[~2006-06-14 22:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-14 12:50 Alexey Sidorov
2006-06-14 22:27 ` Dmitry V. Levin [this message]
2006-06-15 4:22 ` Alexey Sidorov
2006-06-15 4:57 ` Nikolay A. Fetisov
2006-06-15 5:20 ` Alexey Sidorov
2006-06-15 7:10 ` Nikolay A. Fetisov
2006-06-15 7:48 ` Alexey Sidorov
2006-06-15 9:41 ` Vladimir V. Kamarzin
2006-06-15 9:56 ` Alexey Sidorov
2006-06-15 21:31 ` Dmitry V. Levin
2006-06-15 10:30 ` Nikolay A. Fetisov
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=20060614222724.GE8552@basalt.office.altlinux.org \
--to=ldv@altlinux.org \
--cc=community@lists.altlinux.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
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git