check_logfiles: 3.7.5.1
[omd.git] / packages / nagios / patches / 0002-include-omd-site-config.dif
blob848be3760dd8ccefc18850b69d93bc2463af0231
1 diff -ur nagios-3.2.1/html/includes/utils.inc.php nagios-3.2.1.new/html/includes/utils.inc.php
2 --- nagios-3.2.1/html/includes/utils.inc.php    2009-03-10 21:05:43.000000000 +0100
3 +++ nagios-3.2.1.new/html/includes/utils.inc.php        2010-07-03 20:14:37.000000000 +0200
4 @@ -1,7 +1,13 @@
5  <?php
6  // HELPER UTILITIES
7  
8 -require_once(dirname(__FILE__).'/../config.inc.php');
9 +// OMD: read site specific configuration file
10 +// OMD: extract sitename from script filename and find path to
11 +//      site specific configuration file
12 +$omd_parts = explode("/", $_SERVER["SCRIPT_FILENAME"]);
13 +$omd_sitename = $omd_parts[3];
14 +$omd_site_config_path = "/omd/sites/$omd_sitename/etc/nagios/config.inc.php";
15 +require_once($omd_site_config_path);
17  function get_update_information(){
18         global $cfg;