help-cfengine
[Top][All Lists]
Advanced

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

Re: Starting cfexecd from cfagent


From: Alexander Mattausch
Subject: Re: Starting cfexecd from cfagent
Date: Fri, 21 Feb 2003 17:12:38 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.2.1) Gecko/20021130

Matt Armstrong schrieb:

I would like to run cfexecd in daemon mode, and I'd like cfagent to
launch it if it isn't running.  So I throw this in to my cfagent.conf:

   processes:
       "cfexecd" restart "/var/cfengine/bin/cfexecd"

But cfexecd is also run from cron like this:

   0,30 * * * * root /var/cfengine/bin/cfexecd -F

And it seems that cfagent, when run from cfexecd, can't spawn cfexecd.
Maybe this is why the tutorial doesn't recommend doing this.

Is there a simple solution to this?  It'd be nice to get cfagent
launching cfexecd, since the point of cfengine is to avoid the
portability problems of doing this kind of thing with external
scripts.

We are using an at-command for this. The at-call ist put into a script that is run from cfagent, like this:

   processes:
       "cfexecd" restart "/var/cfengine/inputs/scripts/server-restart.sh 
cfengine"


The script is attached, it restarts a service from /etc/init.d. The platform dependence has to be put in this script, the script itself is sh-compatible.

Not such an easy solution as you probably wanted, but I hope it helps.

Regards,
Alex

Attachment: server-restart.sh
Description: Bourne shell script


reply via email to

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