help-cfengine
[Top][All Lists]
Advanced

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

Re: Daemontools and cfengine


From: Nate Campi
Subject: Re: Daemontools and cfengine
Date: Thu, 1 May 2003 14:05:28 -0700
User-agent: Mutt/1.3.28i

On Thu, May 01, 2003 at 10:32:46PM +0200, Thomas Glanzmann wrote:
> Is it possible to tell daemontools that 'it' should restart cfengine if
> the binary has changed? Otherweise I will write a wrapper in c which
> takes for of cfservd and cfexecd (restarts them on crash and checks for
> new version ... and restarts them accordingly).

Have cfengine do it for you. In cfagent.conf:

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
groups:

        # this evaluates to true despite /service/cfservd being a
        # symlink to /etc/cfservd
        have_svc_cfservd = ( "/usr/bin/test -d /service/cfservd" )

copy:
        linux_i686.debian_3_0.Hr00.Min00::
                $(master)/cfengine/linux_i686.debian/cfservd
                        dest=/usr/local/sbin/cfservd
                                mode=755
                                type=binary
                                server=$(fileserver)
                                define=svc_t_cfservd

shellcommands:
        svc_t_cfservd.have_svc_cfservd::
                # when cfservd is copied over, this will restart it,
                # but only if we actually have /service/cfservd, don't
                # assume anything
                "/usr/local/bin/svc -t /service/cfservd" timeout=10
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

In this scheme there's directories on the master server with pre-built
binaries. Use whatever scheme makes sense for you, but defining a class
with copy is a perfect way to make cfengine manage the whole thing for
you.

I have cfengine update itself this way.
-- 
Nate Campi    http://www.campin.net 




reply via email to

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