www.delorie.com/gnu/docs/cfengine/cfengine-Reference_146.html   search  
Buy GNU books!

GNU cfengine

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5. Cfexecd reference

In wrapper mode (non-forking, non-daemon mode), cfagent is run by adding a line to the root crontab file of each system:
0,30 * * * * /usr/local/sbin/cfexecd -F
This is enough to ensure that cfengine will get run. Any output generated by this job, will be stored in `/var/cfengine/outputs'. In addition, if you add the following to the file `cfagent.conf', the system administrator will be emailed a summary of any output:

smtpserver = ( mailhub.example.org ) # site MTA which can talk smtp
sysadm     = ( mark@example.org )   # mail address of sysadm

Fill in suitable values for these variables. An alternative, or additional way to run cfengine, is to run the `cfexecd' program is daemon mode (without the `-F') option. In this mode, the daemon lives in the background and sleeps, activating only in accordance with a scheduling policy. The default policy is to run once every hour (equivalent to Min00_05). Here is how you would modify `cfagent.conf' in order to make the daemon execute cfagent every half-hour:

   # When should cfexecd in daemon mode wake up the agent?

   schedule   = ( Min00_05 Min30_35 )
Note that the time specifications are the basic cfengine time classes. Although one of these methods should suffice, no harm will arise from running both cron and the cfexecd side-by-side. Cfagents locking mechanisms ensure that no contention will occur.

Note, that if problems with library path for compiled in libraries occur, an explicit library path can be specified with the `-L' option.
0,30 * * * * /usr/local/sbin/cfexecd -F -L /local/iu/lib:/local/lib/mysql:/local/lib:/local/gnu/lib

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003