. * * @package LibreNMS * @link http://librenms.org * @copyright 2017 Neil Lathwood * @author Neil Lathwood */ use LibreNMS\Config; if (empty($config['email_from'])) { $config['email_from'] = '"' . $config['project_name'] . '" <' . $config['email_user'] . '@' . php_uname('n') . '>'; } // We need rrdtool so ensure it's set if (empty($config['rrdtool'])) { $config['rrdtool'] = '/usr/bin/rrdtool'; } if (empty($config['rrdtool_version'])) { $config['rrdtool_version'] = 1.4; } if ($config['secure_cookies']) { ini_set('session.cookie_secure', 1); } if ($config['rrdgraph_real_95th']) { $config['rrdgraph_real_percentile'] = $config['rrdgraph_real_95th']; } // make sure we have full path to binaries in case PATH isn't set foreach (array('fping', 'fping6', 'snmpgetnext') as $bin) { if (!is_executable(Config::get($bin))) { Config::set($bin, locate_binary($bin), true, $bin, "Path to $bin", 'external', 'paths'); } }