From: vserge <vserge@altlinux.ru>
To: ALT Devel discussion list <devel@altlinux.ru>
Subject: [devel] Вопрос про initscripts
Date: Wed, 17 Aug 2005 23:46:59 +0400
Message-ID: <20050817234659.4627ec3b@shrek.msk.menatepspb.com> (raw)
Приветствую
При написании инитскрипта для HPLIP cтолкнулся со следующей проблемой
и соответственно требуется помощь или разъяснения:
Проблема:
имеем скрип, написанный на python, который запускается как демон
в заголовке скрипта имеем:
#> head /usr/share/hplip/hpssd.py
#!/usr/bin/env python
#
в инитскрипте прописываем соответственно:
HPSSD_PIDFILE=/var/run/hpssd.pid
HPSSD_LOCKFILE=/var/lock/subsys/hpssd
HPSSD=/usr/share/hplip/hpssd.py
start_daemon --pidfile "$HPSSD_PIDFILE" --lockfile "$HPSSD_LOCKFILE"
--expect-user root -- $HPSSD
stop_daemon --pidfile "$HPSSD_PIDFILE" --lockfile "$HPSSD_LOCKFILE"
--expect-user root -- $HPSSD
status --pidfile "$HPSSD_PIDFILE" --expect-user root -- $HPSSD
При этом скрипт stop и status не отрабатывают как надо, т.е.
#> service hplip status
hpssd.py is dead, but stale PID file exists
Но если в инитскрипте заменить вызов stop_daemon на прямой вызов
start-stop-daemon, то все работает
start-stop-daemon --pidfile "$HPSSD_PIDFILE" --user root --stop $HPSSD
Как быть в таких случаях ?
--
next reply other threads:[~2005-08-17 19:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-17 19:46 vserge [this message]
2005-08-18 12:43 ` [devel] Вопрос про initscripts - ВОПРОС адресован в первую очередь LDV vserge
2005-08-18 13:01 ` [devel] [JT] " Dmitry V. Levin
2005-08-18 14:56 ` vserge
2005-08-18 15:02 ` Ivan Fedorov
2005-08-18 13:05 ` [devel] Вопрос про initscripts Dmitry V. Levin
2005-08-18 14:55 ` vserge
2005-08-18 15:01 ` Ivan Fedorov
2005-08-18 15:34 ` vserge
2005-08-20 8:23 ` Ivan Fedorov
2005-08-18 15:57 ` Dmitry V. Levin
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=20050817234659.4627ec3b@shrek.msk.menatepspb.com \
--to=vserge@altlinux.ru \
--cc=devel@altlinux.ru \
/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 Team development discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel/0 devel/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 devel devel/ http://lore.altlinux.org/devel \
devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
public-inbox-index devel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git