On 2024-01-03, Mik J <mikyde...@yahoo.fr> wrote:
> Hello,
>
> I don't understand how the startup/stop script works

It uses the string from pexp (as it was when the daemon was _started_;
changes to the rc script after startup are ignored) with pgrep(1) -xf to
identify the running process (and pkill -xf to actually signal it).

> I can confirm that the pid I see in /var/run/opensearch/opensearch.pid is the 
> same I see in ps ax | grep opensearch
>
> However when I want to stop the process
> # /etc/rc.d/opensearch stop
> Nothing happens

Show the contents of /var/run/rc.d/opensearch and the output of some
pgrep command that identifies the process (e.g. pgrep -lf opensearch).

> And I don't understand how this stop command would do something like that
> # kill -15 `cat /var/run/opensearch/opensearch.pid`

rc.d doesn't use pid files. If the daemon exited without cleaning the
file (e.g in a crash) the pid may have been re-used by another process.

-- 
Please keep replies on the mailing list.

Reply via email to