Guillaume Rousse wrote:
> I'd like to manage process on clients to make sure some processes
> are running, and some others are not. I don't want to send processes
> signals directly, I prefer to use system service scripts, so as to
> take care of lock file, etc... I once used restart facility, allowing
> to launch a shell command, but only if a signal was not found, thus
> unable to deal with shutting down processes.
This worked for me:
processes:
"sshd" matches=<1 action=bymatch define=running_sshd
alerts:
running_sshd::
"I am running sshd"
It seems to generate some output also, but maybe that is good enough for
you. If not, you can always use ReturnsZero with a /bin/sh -c '' and ps.
Best,
Brendan
--
Senior System Administrator
The University of Chicago
Department of Computer Science
http://www.cs.uchicago.edu/people/brendan
http://praksys.blogspot.com/
_______________________________________________
Help-cfengine mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-cfengine