If you change the file using copy, the use the "define=classname" option. Then you can restart iptables if that class if defined.

For example:
------------------------
copy:
/etc/sysconfig/iptables server=yourserver.example.com define=restart_iptables

shellcommands:

restart_iptables::
 "/etc/init.d/iptables restart" timeout=30
-------------------------------------------------

I think that editfiles has a similar way to define a class if the file is changed.

Edgardo Diesta Jr. wrote:
Sir,
Can I restart process only if I change something. example I change /etc/sysconfig/iptables, if iptables change, i'll restart, but If not, I'll ignore restart process. How can I do that? where do I configure?

On 7/7/06, *Jason Martin* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    On Fri, Jul 07, 2006 at 07:17:21AM +0800, Edgardo Diesta Jr. wrote:
    > Sir,
    > Question, I've been searching google.com <http://google.com> on
    how to LOG all activities of
    > cfengine, regarding copy, tidy, resets, etc.... How do I do
    that? do I have
    > to configure something?
    Set 'inform = true' and it'll tell you when it changes somthing.

    -Jason Martin
    > Thanks sir.
    >
    > On 7/6/06, Edgardo Diesta Jr. < [EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>> wrote:
    > >
    > >Okay sir thank you so much.
    > >
    > >
    > >On 7/3/06, Jason Edgecombe <[EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>> wrote:
    > >>
    > >> Edgardo Diesta Jr. wrote:
    > >> > Sir/Ma'am,
    > >> >  I'm Edgardo Diesta, a Systems Admin here in philippines.
    I've read
    > >> > about cfengine and I've learned that it can centralized a
    systems
    > >> > configuration(s). Sir/Ma'am, I would really really
    appreciate if you
    > >> > can help me build a cfengine system 'Server / Client'.
    Sir/Ma'am,
    > >> > please help me step by step.
    > >> >
    > >> >
    > >> > Many Thanks to all the members.
    > >> Edgardo,
    > >>
    > >> I would suggest reading the tutorial at
    > >> http://www.cfengine.org/docs/cfengine-Tutorial.html and the
    article
    > >> http://www.linuxjournal.com/article/6848
    > >>
    > >> You will first need to download cfengine as a binary package
    or as a
    > >> source package. The source package will need to be compiled.
    > >>
    > >>
    > >> Jason
    > >>
    > >>
    > >
    > >
    > >--
    > >Totoy Bibo
    > >Bibong Bibo Inc.
    > >
    >
    >
    >



    --
    Cause of crash: Inadvertent contact with the ground.
    This message is PGP/MIME signed.





--
Totoy Bibo
Bibong Bibo Inc.




_______________________________________________
Help-cfengine mailing list
Help-cfengine@gnu.org
http://lists.gnu.org/mailman/listinfo/help-cfengine

Reply via email to