状態、Ubuntuのkillprocコマンド

状態、Ubuntuのkillprocコマンド

init.dCentos 6.6サーバーからUbuntu 14.04にスクリプトを移行しようとしています。 Centosマシンstart, status, stopコマンドは次のとおりです。

daemon --pidfile=/path/to/pidfile /path/to/daemon/script
status -p /path/to/pidfile /path/to/daemon/script
killproc -p /path/to/pidfile /path/to/daemon/script

startこのコマンドは元の形式のUbuntu 14.04でうまく機能しますが、他の2つの機能はUbuntuディストリビューstatus, killprocションでは定義されていません。

Ubuntuマシンでこれらのコマンドに対応するものは何ですか?

ベストアンサー1

私のUbuntuシステムkillprocでは/lib/lsb/init-functions

http://refspecs.linuxbase.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptfunc.html

入れたことある?

. /lib/lsb/init-functions

初期化スクリプトの上部付近にありますか?

$ dpkg -S /lib/lsb/init-functions
lsb-base: /lib/lsb/init-functions

$ dpkg -S /sbin/status
upstart: /sbin/status

$ apt-cache show lsb-base
Package: lsb-base
Priority: required

おすすめ記事