--- nagios-pnp-0.3+svn00210.orig/sample-config/pnp/process_perfdata.cfg-sample.in
+++ nagios-pnp-0.3+svn00210/sample-config/pnp/process_perfdata.cfg-sample.in
@@ -25,7 +25,7 @@
 #
 #
 #
-RRA_CFG = @CFG_DIR@/pnp/rra.cfg
+RRA_CFG = @CFG_DIR@/rra.cfg
 #
 #
 #
--- nagios-pnp-0.3+svn00210.orig/share/pnp/conf/config.php.in
+++ nagios-pnp-0.3+svn00210/share/pnp/conf/config.php.in
@@ -21,6 +21,10 @@
 ##
 # Credit:  Tobi Oetiker, http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/
 #
+# Config Directory
+#
+$conf['cfg_dir'] = "@CFG_DIR@/";
+#
 # Path to rrdtool
 #
 $conf['rrdtool'] = "@RRDTOOL@";
--- nagios-pnp-0.3+svn00210.orig/share/pnp/include/function.inc.php
+++ nagios-pnp-0.3+svn00210/share/pnp/include/function.inc.php
@@ -534,15 +534,16 @@
 }
 
 function doFindTemplate($template) {
-	if (is_readable('templates/' . $template . '.php')) {
-		$template = 'templates/' . $template . '.php';
+	global $conf;
+	if (is_readable($conf['cfg_dir'] . 'templates/' . $template . '.php')) {
+		$template = $conf['cfg_dir'] . 'templates/' . $template . '.php';
 		return $template;
 	}
-	elseif (is_readable('templates.dist/' . $template . '.php')) {
-		$template = 'templates.dist/' . $template . '.php';
+	elseif (is_readable($conf['cfg_dir'] . 'templates.dist/' . $template . '.php')) {
+		$template = $conf['cfg_dir'] . 'templates.dist/' . $template . '.php';
 		return $template;
 	} else {
-		return "templates.dist/default.php";
+		return $conf['cfg_dir'] . "templates.dist/default.php";
 	}
 
 }
--- nagios-pnp-0.3+svn00210.orig/share/pnp/ajax.php
+++ nagios-pnp-0.3+svn00210/share/pnp/ajax.php
@@ -21,7 +21,7 @@
 ##
 error_reporting(E_ALL ^E_NOTICE);
 include ('include/function.inc.php');
-$config = "conf/config";
+$config = "/etc/nagios-pnp/conf/config";
 if(is_readable($config.".php")){
         include ($config.".php");
 }else{
--- nagios-pnp-0.3+svn00210.orig/share/pnp/index.php
+++ nagios-pnp-0.3+svn00210/share/pnp/index.php
@@ -22,7 +22,7 @@
 error_reporting(E_ALL ^E_NOTICE);
 require ('include/function.inc.php');
 require ('include/debug.php');
-$config = "conf/config";
+$config = "/etc/nagios-pnp/conf/config";
 if (is_readable($config . ".php")) {
 	include ($config . ".php");
 } else {
--- nagios-pnp-0.3+svn00210.orig/share/pnp/zoom.php
+++ nagios-pnp-0.3+svn00210/share/pnp/zoom.php
@@ -21,7 +21,7 @@
 ##
 error_reporting(E_ALL ^E_NOTICE);
 include ('include/function.inc.php');
-$config = "conf/config";
+$config = "/etc/nagios-pnp/conf/config";
 if (is_readable($config . ".php")) {
         include ($config . ".php");
 } else {
--- nagios-pnp-0.3+svn00210.orig/configure
+++ nagios-pnp-0.3+svn00210/configure
@@ -3961,8 +3961,8 @@
 
 
 else
-        PERFDATA_DIR="$localstatedir/pnp/perfdata"
-        PERFDATA_LOG="$localstatedir/pnp/perfdata.log"
+        PERFDATA_DIR="$localstatedir/perfdata"
+        PERFDATA_LOG="$localstatedir/perfdata.log"
 
 
 fi
@@ -3971,7 +3971,7 @@
 	CFG_DIR="$PRE/etc/pnp"
 
 else
-	CFG_DIR="$sysconfdir/pnp"
+	CFG_DIR="$sysconfdir"
 
 fi
 
--- nagios-pnp-0.3+svn00210.orig/configure.ac
+++ nagios-pnp-0.3+svn00210/configure.ac
@@ -95,8 +95,8 @@
         AC_SUBST(PERFDATA_DIR)
         AC_SUBST(PERFDATA_LOG)
 else
-        PERFDATA_DIR="$localstatedir/pnp/perfdata"
-        PERFDATA_LOG="$localstatedir/pnp/perfdata.log"
+        PERFDATA_DIR="$localstatedir/perfdata"
+        PERFDATA_LOG="$localstatedir/perfdata.log"
         AC_SUBST(PERFDATA_DIR)
         AC_SUBST(PERFDATA_LOG)
 fi
@@ -105,7 +105,7 @@
 	CFG_DIR="$PRE/etc/pnp"
         AC_SUBST(CFG_DIR)
 else
-	CFG_DIR="$sysconfdir/pnp"
+	CFG_DIR="$sysconfdir"
         AC_SUBST(CFG_DIR)
 fi
 

