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:
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:
0,30 * * * * /usr/local/sbin/cfexecd -F
smtpserver = ( mailhub.example.org ) # site MTA which can talk smtp
sysadm = ( email@example.com ) # 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
Min00_05). Here is how you would modify `cfagent.conf' in
order to make the daemon execute cfagent every half-hour:
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.
# When should cfexecd in daemon mode wake up the agent?
schedule = ( Min00_05 Min30_35 )
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