Code

patches/adjust-template-path: Added support for /etc/pnp4nagios/templates.d.
[pkg-pnp4nagios.git] / debian / patches / adjust-template-path
1 Description: Install templates into /etc/ rather than /usr/share/.
2  Also, add support for templates.d directory.
3 Author: Sven Velt <sven@velt.de>, Sebastian Harl <tokkee@debian.org
4 Forwarded: not-needed
6 --- a/sample-config/pnp/config.php.in
7 +++ b/sample-config/pnp/config.php.in
8 @@ -214,12 +214,15 @@
9  # Add your own template directories here
10  # First match wins!
11  #$conf['template_dirs'][] = '/usr/local/check_mk/pnp-templates';
12 -$conf['template_dirs'][] = '@datarootdir@/templates';
13 +$conf['template_dirs'][] = '@sysconfdir@/templates';
14 +foreach (glob("/etc/pnp4nagios/templates.d/*", GLOB_ONLYDIR) as $dirname) {
15 +       $conf['template_dirs'][] = "$dirname";
16 +}
17  $conf['template_dirs'][] = '@datarootdir@/templates.dist';
18  
19  #
20  # Directory to search for special templates
21  #
22 -$conf['special_template_dir'] = '@datarootdir@/templates.special';
23 +$conf['special_template_dir'] = '@sysconfdir@/templates.special';
24  
25  #