[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[debian-users:41682] Re: 起動停止スクリプトについて
- From: TSUCHIYA Masatoshi <tsuchiya@xxxxxxxxxx>
- Subject: [debian-users:41682] Re: 起動停止スクリプトについて
- Date: Thu, 14 Oct 2004 22:56:02 +0900
- List-help: <mailto:debian-users-ctl@debian.or.jp?body=help>
- List-id: debian-users.debian.or.jp
- List-owner: <mailto:debian-users-admin@debian.or.jp>
- List-post: <mailto:debian-users@debian.or.jp>
- List-software: fml [fml 4.0.3 release (20011202/4.0.3)]
- List-unsubscribe: <mailto:debian-users-ctl@debian.or.jp?body=unsubscribe>
- X-cite: xcite 1.49
- X-cite-me: 土
- X-dispatcher: imput version 20040704(IM147)
- X-ml-info: If you have a question, send e-mail with the body "help" (without quotes) to the address debian-users-ctl@debian.or.jp; help=<mailto:debian-users-ctl@debian.or.jp?body=help>
- X-ml-name: debian-users
- X-mlserver: fml [fml 4.0.3 release (20011202/4.0.3)]; post only (only members can post)
- X-original-to: debian-users@debian.or.jp
- X-sender: TSUCHIYA Masatoshi <tsuchiya@xxxxxxxxxxxxxxxxxxxxxxx>
- X-spam-level:
- X-spam-status: No, hits=0.4 required=10.0 tests=IN_REP_TO,ISO2022JP_BODY,ISO2022JP_CHARSET,RCVD_IN_ORBS, RCVD_IN_OSIRUSOFT_COM,REFERENCES,SIGNATURE_SHORT_DENSE, SPAM_PHRASE_00_01,USER_AGENT,USER_AGENT_GNUS_UA, X_OSIRU_OPEN_RELAY version=2.44
- References: <20041014162551.45E8.SHIMADEN@xxxxxxxxx> <20041014092935967.URBH.426371.t-mta7.odn.ne.jp@xxxxxxxxxxxxxx> <20041014211852.45EE.SHIMADEN@xxxxxxxxx>
- Message-id: <87655dwgi7.fsf@xxxxxxxxxx>
- X-mail-count: 41682
- User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux)
>> On Thu, 14 Oct 2004 21:29:37 +0900
>> shimaden@xxxxxxxxx (Hiroyuki Shimada) said as follows:
>ps ax | grep noip | grep -v noip | awk '{print $1;}'
>あら不思議、noip プログラムの PID が表示されます。
‥‥‥本当に?
% ps ax | grep noip ← noip を含む行だけを表示
% ps ax | grep -v noip ← noip を含まない行だけを表示
なので,
% ps ax | grep noip | grep -v noip
したら「何も表示されない」のではないかと.
といういちゃもんはさておき,この手法は定番ですよね.Solaris の init ス
クリプトだと以下のような定型句をよく見掛けました.
pid=`ps xo pid,comm|awk '/program/{print $1}'`
if [ "$pid"x != x ]; then
kill $pid
fi
--
土屋 雅稔 ( TSUCHIYA Masatoshi )