[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Starting cfexecd from cfagent
From: |
Matt Armstrong |
Subject: |
Re: Starting cfexecd from cfagent |
Date: |
Mon, 24 Feb 2003 00:09:57 -0700 |
User-agent: |
Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.2 |
Andrew Stribblehill <a.d.stribblehill@durham.ac.uk> writes:
> 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"
[...]
>> 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>
I ended up with this:
processes:
"cfexecd$" restart "/var/cfengine/bin/cfexecd"
I didn't know the "cfexecd$" could be a regexp. The $ prevents the
"cfexecd -F" from matching. I expected this to work too, but it
didn't seem to:
processes:
"cfexecd" exclude="-F" restart "/var/cfengine/bin/cfexecd"
--
matt