help-cfengine
[Top][All Lists]
Advanced

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

Re: Conditional restart


From: Jamie Wilkinson
Subject: Re: Conditional restart
Date: Fri, 14 Feb 2003 11:38:01 +1100
User-agent: Internet Messaging Program (IMP) 3.1

Quoting Manon Goo <manon@manon.de>:

> Hello,
> 
> Is there an solution to condition the restart of a service ? I would like 
> to copy (and edit) the syslog.conf and postfix config from a central host 
> an only restart syslog and config if syslogd.conf changes. I would only 
> like to restart postfix if main.cf or master.cf is changed

Do the copy only if the file has changed, using the checksum test; if and only
if the copy occurs, the defined classes will be set and then you can use that in
a shellcommands section, like so:

copy:

    file
        dest=somewhere
        type=checksum
        timestamp=keep
        define=restart_something

shellcommands:

   restart_something::

     "/etc/init.d/something restart"  useshell=false






reply via email to

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