Imported Debian patch 0.6.24+dfsg1-4~bpo80+1
This commit is contained in:
committed by
Mario Fetka
parent
32a360eca6
commit
69f960eb4a
29
debian/patches/adjust-template-path
vendored
Normal file
29
debian/patches/adjust-template-path
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
Description: Install templates into /etc/ rather than /usr/share/.
|
||||
Also, add support for templates.d directory.
|
||||
Author: Sven Velt <sven@velt.de>, Sebastian Harl <tokkee@debian.org
|
||||
Forwarded: not-needed
|
||||
|
||||
--- a/sample-config/pnp/config.php.in
|
||||
+++ b/sample-config/pnp/config.php.in
|
||||
@@ -230,13 +230,19 @@ $conf['RRD_DAEMON_OPTS'] = '';
|
||||
# Add your own template directories here
|
||||
# First match wins!
|
||||
#$conf['template_dirs'][] = '/usr/local/check_mk/pnp-templates';
|
||||
-$conf['template_dirs'][] = '@datarootdir@/templates';
|
||||
+$conf['template_dirs'][] = '@sysconfdir@/templates';
|
||||
+$templates_d = glob("/etc/pnp4nagios/templates.d/*", GLOB_ONLYDIR);
|
||||
+if (is_array($templates_d) && (count($templates_d) > 0)) {
|
||||
+ foreach ($templates_d as $dirname) {
|
||||
+ $conf['template_dirs'][] = "$dirname";
|
||||
+ }
|
||||
+}
|
||||
$conf['template_dirs'][] = '@datarootdir@/templates.dist';
|
||||
|
||||
#
|
||||
# Directory to search for special templates
|
||||
#
|
||||
-$conf['special_template_dir'] = '@datarootdir@/templates.special';
|
||||
+$conf['special_template_dir'] = '@sysconfdir@/templates.special';
|
||||
|
||||
#
|
||||
# Regex to detect mobile devices
|
||||
Reference in New Issue
Block a user