help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: troubles with process handling


From: Atom Powers
Subject: Re: troubles with process handling
Date: Thu, 19 Jan 2006 09:00:20 -0800

cfengine 2.1.16: no error but doesn't work.
----
$/bin/ps auxw | grep sshd
root      483  0.0  0.0  3872   228  ??  Ss   21Dec05   0:00.43 /usr/sbin/sshd

----
#!/var/cfengine/bin/cfagent -qvKf
######################################################################

control:
  actionsequence = ( processes )

processes:
  "sshd" define=exists elsedefine=doesnt_exist

alerts:
  exists::
        "process is running"
  doesnt_exist::
        "process is not running"
----
*********************************************************************
 Main Tree Sched: processes pass 1 @ Thu Jan 19 08:58:05 2006
*********************************************************************

cfengine:: Running process command /bin/ps auxw
---------------------------------------------------------------------
Alerts
---------------------------------------------------------------------



++++++++++++++++++++++++++++++++++++++++
----

On 1/19/06, Guillaume Rousse <Guillaume.Rousse@inria.fr> 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.
>
> I tries to use the define and elsedefine facilities, in a similar manner
> as I do for managing installed packages. However, it appears to trigger
> errors in cfengine.
>
> The following syntax:
> "sshd" elsedefine=need_start_sshd
>
> triggers the following error message:
> Insufficient or incomplete processes statement
>
> I tested it with cfengine 2.1.12 and 2.1.15.
> --
> Any lock finish or style that you have with you will not match the rest
> of the hardware in the building
>                 -- Murphy's Laws of Locksmithing n°19
>
>
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-cfengine
>


--
--
Perfection is just a word I use occasionally with mustard.
--Atom Powers--




reply via email to

[Prev in Thread] Current Thread [Next in Thread]