help-cfengine
[Top][All Lists]
Advanced

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

Re: Starting cfexecd from cfagent


From: Andrew Stribblehill
Subject: Re: Starting cfexecd from cfagent
Date: Fri, 21 Feb 2003 20:21:38 +0000
User-agent: Mutt/1.5.3i

Quoting Matt Armstrong <matt@lickey.com> (2003-02-21 03:56:13 GMT):
> 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.

Well, it *can* but it doesn't because there's already one running :)

> 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.

<hack type="ugly">
Make a symlink: (cd /var/cfengine/bin && ln -s cfexecd Cfexecd)
Edit your crontab to call Cfexecd rather than cfexecd
</hack>

This way, ps will see it as being Cfexecd and not cfexecd, and won't
mind starting cfexecd.


Your alternative is to get cron to call the daemon without arguments,
but you'll have to redirect stderr to /dev/null and not care about
its exit status if you do that.

-- 
PLYMOUTH BISCAY
SOUTHEASTERLY 5 TO 7, OCCASIONALLY GALE 8 IN BISCAY. RAIN LATER.
MODERATE OR GOOD




reply via email to

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