Scott A. McIntyre on Fri, Jan 05, 2001 at 09:13:37AM +0100: Hi,
Is there any way to have syslog-ng read it's configuration information in the increasingly popular "everything in this directory is a configuration file to be read" manner? The examples I'm thinking of include xinetd and logrotate...
I didn't realize this was increasingly popular ;)
It would be useful to have all of the host-specific filters, destinations and sources all in one file, but only for that host in question, rather than having to build what could eventually be a very large single file.
I would prefer "include" directives as opposed to the directory thing. What if you edit a file in this directory and restart syslog-ng while the editor keeps a backup-copy in the same place? How do you handle backup copies of configuration that you change? I usually create "configfile.YYYYMMDD" in the same directory. :) What I usually do when I work with software that doesn't support including and yet has a huge configuration, is to write a little Make- file with a default target that does whatever needs to be done to concatenate my set of config files. For some things, I even abuse the gcc C preprocessor. If the application supports it, you could also have a "test" target that starts the app with a config check option. In particular, if you have a seperate directory for each of your daemons, you can put Makefile, includes, maybe some README and the actual config file (plus above mentioned backup copies) in the same place. Real includes would be slightly better, but this works very well for many applications. Regards, Gregor. -- Gregor Binder <gbinder@sysfive.com> http://www.sysfive.com/~gbinder/ sysfive.com GmbH UNIX. Networking. Security. Applications. Gaertnerstrasse 125b, 20253 Hamburg, Germany TEL +49-40-63647482