[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[debian-devel:14021] Re: start-stop-daemon
ä½é‡Žï¼ 浜æ¾ã§ã™ã€‚
In <20010406081218.D99A153813@xxxxxxxxxxxxxxxxxxxxxx>,
on "Fri, 6 Apr 2001 17:12:20 +0900',
with "[debian-devel:14017] Re: start-stop-daemon",
Kenshi Muto <kmuto@xxxxxxxxxxxxxxx> ã•ã‚“ wrote:
> solid-pop3dã®standalone.cã®
>
> switch (fork()) {
> ...
> };
>
> ã®ã‚ã¨ã«ã§ã‚‚/var/run/spop3d.pidを作ã£ã¦ã“ã‚Œã«getpid()ã®çµæžœã‚’
> 書ã出ã™ã‚ˆã†ã«ã™ã‚‹ãƒ«ãƒ¼ãƒãƒ³ã‚’入れるã¨ã„ã†ã‚ãŸã‚ŠãŒè§£æ±ºæ–¹æ³•ã§ã—ょã†ã‹ã€‚
ãŸã¶ã‚“ã“ã®æ¦è—¤ã•ã‚“ã®æ案ã®ã»ã†ãŒæ£æ”»æ³•ã ã¨æ€ã„ã¾ã™ãŒ
quick dirty hack ã¨ã—ã¦ã¯ /etc/init.d/solid-pop3d ã®ä¸ã§
ãªã‚“ã¨ã‹ã—ã¦ã—ã¾ã†ã€ã¨ã„ã†ã®ã§ã‚‚ã„ã„ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。
åŒæ™‚ã«è¤‡æ•°ãŒå®Ÿè¡Œã•ã‚Œã¦ã„るよã†ã ã¨å‹•ä½œã‚’ä¿è¨¼ã§ãã¾ã›ã‚“ãŒã€
ps ax 㧠solid-pop3d ㌠1 ã¤ã ã‘表示ã•ã‚Œã‚‹ã‚ˆã†ãªã‚‰
i=`ps x|grep solid-popd3|grep -v grep|awk '{ print $1 }'|head -1`
㧠pid を拾ãˆã‚‹ã¨æ€ã†ã®ã§ã€ãŸã¨ãˆã°
> case "$1" in
> start)
> echo -n "Starting $DESC: "
start-stop-daemon --start --quiet \
--exec $DAEMON -- $DAEMONCONF
pid=`ps x|grep solid-popd3|grep -v grep|awk '{ print $1 }'|head -1`
echo $pid >/var/run/$NAME.pid
> echo "$NAME."
> ;;
(ä¸ç•¥)
> restart|force-reload)
> #
> # If the "reload" option is implemented, move the "force-reload"
> # option to the "reload" entry above. If not, "force-reload" is
> # just the same as "restart".
> #
> echo -n "Restarting $DESC: "
> start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid
> sleep 1
$0 start
> ;;
ã¨ã—ã¦ã—ã¾ã†ã¨ã‹ã€‚
--
# (ã‚ãŸã—ã®ãŠã†ã¡ã¯æµœæ¾å¸‚ã€ã€Œå¤œã®ãŠè“åã€ã§æœ‰åã•ã€‚)
<kgh12351@xxxxxxxxxxx> : Taketoshi Sano (ä½é‡Žã€€æ¦ä¿Š)