You might probably do something like the following;
########################################################
files:
"/var/test0/test1"
changes => tripwire,
commands:
checksum_alerts::
"/var/cfengine/bin/cf-runagent -H192.168.1.1"
classes => cancel_checksum_alerts;
...
body classes cancel_checksum_alerts
{
cancel_repaired => { "checksum_alerts" };
}
########################################################
When the file /var/test0/test1 is changed, you would see an output on screen.
Meanwhile, cfengine triggers a class "checksum_alerts". For the 2nd run,
cf-runagent would be executed and "checksum_alerts" would be cancelled. The 3rd
run would do nothing if the file isn't changed.
Cheers,
--Nakarin
On Aug 5, 2010, at 8:56 PM, [email protected] wrote:
> Forum: Cfengine Help
> Subject: Re: run cf-runagent only when file is changed (not copied, not
> created).
> Author: Igor
> Link to topic: https://cfengine.com/forum/read.php?3,17843,17848#msg-17848
>
> Ok, advise please, how i can start cf-runagent in this case, without setup
> classes in this case?
>
> ---
> Igor
>
> _______________________________________________
> Help-cfengine mailing list
> [email protected]
> https://cfengine.org/mailman/listinfo/help-cfengine
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine