add machine-specific RRD config files and make them be selected automatically via...
[php-utility-classes.git] / testbed / rrd / rrd-update.php
index 30b23b2131eddfd8cd9753346a60cb4506b804e9..159763bc56892e60a2798f18b392d1492e68bfa5 100644 (file)
@@ -8,7 +8,10 @@ if (getcwd() != dirname($myfile)) {
 }
 
 include_once('rrdstat.php-class');
-include_once('rrd-config.inc.php');
+
+$rrd_config_file = 'rrd-config/'.php_uname('n').'.inc.php';
+if (!file_exists($rrd_config_file)) { $rrd_config_file = 'rrd-config.inc.php'; }
+include_once($rrd_config_file);
 
 if (php_sapi_name() == 'cli') {
   // automated updates