help-cfengine
[Top][All Lists]
Advanced

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

Re: Restart daemon after config change


From: Alexander Mattausch
Subject: Re: Restart daemon after config change
Date: Thu, 18 Dec 2003 16:20:37 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.5) Gecko/20031007

Kief Morris schrieb:

Alexander Mattausch typed the following on 15:11 18/12/2003 +0100
Kief Morris schrieb:
I want to find a way to restart daemons when their configuration files
have been changed. I thought I might use file checksum monitoring
to set a class (eg. "bind_needs_restart") that would later trigger
a shellcommand to run the init script ("/etc/init.d/bind9 reload").

However, the define attribute isn't triggered when the checksum
changes, so that's a no-go.
Add the following:

control:
AddInstallable = ( bind_needs_restart )

It still doesn't work. I can see why I would need this, but from the
documentation, it looks like the define= attribute only works if the
file statement causes the file to be changed - it specifically says
it doesn't set the class if there is only a warning. Have you got it
working this way?

A missing AddInstallable is just the common error, that's why I mentioned it.

Actually this mechanism is working very well with the copy statement, I'm not using it in the files section. So when the documentation says that a class is only set when the file is modified by the files statement, then the class is probably not set.

Maybe it would be an idea to add another keyword like 'warn_define' in the code which defines a class whenever a warning is issued.

Regards,
Alex






reply via email to

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