Details
-
Improvement
-
Resolution: Fixed
-
Critical
-
6.5.0
Description
In non-root install cases, the normal mechanism for checking status of Couchbase Server (systemctl status couchbase-server.service) isn't available. It would be good to add some kind of status command to the couchbase-server.sh script.
Checking status is not completely trivial. I suggest we do something like we used to do when we integrated with init.d - i.e.
running() {
|
pidofproc -p $PIDFILE $DAEMON >/dev/null
|
errcode=$?
|
return $errcode
|
}
|
pidofproc isn't available in general so if we go this way, we'll need to emulate it. I.e. us /proc or ps to check that a process with the expected PID is running and is associated with the expected executable.
There are different approaches to this and we can debate as to which way we want to go.
Details on pidofproc (and other init functions): http://refspecs.linuxfoundation.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptfunc.html