I have a situation, many of them in fact, where I want to create a template file, make multiple edits to it, and then restart a service if the destination file is updated. How can I manage my editfiles without restarting the service every time cfengine runs?
I could do my editfiles on "$(FileSource)/common/etc/inetd.conf"; but then that file would be copied from the masterfiles server every time cfengine runs. How have you solved this problem? For example: I have a default inetd.conf file, with sshd in it. -- copy:: $(FileSource)/common/etc/inetd.conf dest=/etc/inetd.conf mode=664 owner=root group=wheel -- Some hosts run ftp, others run nntp: -- editfiles: ftp-server:: { /etc/inetd.conf AppendIfNoSuchLine "ftp stream tcp nowait root /usr/libexec/ftpd ftpd -l" DefineClasses "newinetd" } nntp-server:: { /etc/inetd.conf AppendIfNoSuchLine "nntp stream tcp nowait news /usr/local/libexec/nntpd nntpd" DefineClasses "newinetd" } -- Then I restart inetd if the config file changed: -- shellcommands: newinetd:: "/etc/rc.d/inetd restart" -- This will modify inetd.conf, and thus restart inetd, every time. -- -- Perfection is just a word I use occasionally with mustard. --Atom Powers-- _______________________________________________ Help-cfengine mailing list Help-cfengine@gnu.org http://lists.gnu.org/mailman/listinfo/help-cfengine