On 2020-10-07, ben <[email protected]> wrote:
>>I think you might need a pexp variable, process grep expression to be used b
>>y pgrep to determine if the service is running.
>
> I've tried using pexp, the result is the same; I can start the script and
> receive the 'tmux(ok)' message, but upon running the '/etc/rc.d/tmux stop'
> I receive no messages and the script silently exits.
>
>

No messages implies a pexp mismatch.

When you start a daemon from an rc.d script the original pexp is
saved to /var/run/rc.d/$daemon so that if a package is updated while
a daemon is running (which may result in the process title actually
changing) it will still be possible to identify if the original
daemon is running.

So, if you have edited the script to add a pexp *after* starting
it, you'll need to remove that /var/run file otherwise it will
still use the old one or the default.



Reply via email to