From: Didier Raboud Date: Wed, 7 Mar 2012 09:56:25 +0000 (+0100) Subject: lsb-base.README.Debian: Document status_of_proc. X-Git-Tag: archive/raspbian/10.2018112800+rpi1^2~159^2~7 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=169b65b73705e83e012940b6d8bf3857c0e53b43;p=lsb.git lsb-base.README.Debian: Document status_of_proc. Closes: #565631 Reported-by: Thomas Koch Signed-off-by: Didier Raboud --- diff --git a/debian/lsb-base.README.Debian b/debian/lsb-base.README.Debian index 360ae21..c10d827 100644 --- a/debian/lsb-base.README.Debian +++ b/debian/lsb-base.README.Debian @@ -68,6 +68,35 @@ specific to Debian and (in some cases) other derived distributions. Note that unlike log_end_msg(), this function does not return the first argument as its exit code. + - status_of_proc [-p pidfile] pathname "Daemon_name" + + Log the status of a process and return an LSB-compliant exit status + code: + + 0 program is running or service is OK + 1 program is dead and /var/run pid file exists + 2 program is dead and /var/lock lock file exists + 3 program is not running + 4 program or service status is unknown + 5-99 reserved for future LSB use + 100-149 reserved for distribution use + 150-199 reserved for application use + 200-254 reserved + + On Debian, outputs: + "Daemon_name is running.". + "Daemon_name is not running ... failed!" + + The pidfile path will be used as argument for pidofproc and must be + provided if the pidfile is not /var/run/$daemon_basename.pid. + + status_of_proc can be used to easily implement the "status" argument + of init scripts: + + status) + status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? + ;; + A deprecated function, log_start_msg, is also provided for compatibility with a few older packages and a derived distribution. This may eventually disappear.