diff options
author | Martin Fuchs <trendchiller@users.noreply.github.com> | 2014-06-10 15:48:33 +0200 |
---|---|---|
committer | Martin Fuchs <trendchiller@users.noreply.github.com> | 2014-06-10 15:48:33 +0200 |
commit | 0ef20f92b5bea3d3487c249d515f905d09f859a7 (patch) | |
tree | 76101c20efe2f68b0f455070f1f077058e52868d /config/nrpe2/nrpe2.inc | |
parent | ff5060af8732ef9bd55a95537f3705c7382e19e0 (diff) | |
parent | b2bea6eac166ab17ed1e5776ea32d822f459a914 (diff) | |
download | pfsense-packages-0ef20f92b5bea3d3487c249d515f905d09f859a7.tar.gz pfsense-packages-0ef20f92b5bea3d3487c249d515f905d09f859a7.tar.bz2 pfsense-packages-0ef20f92b5bea3d3487c249d515f905d09f859a7.zip |
Merge pull request #1 from pfsense/master
update fork
Diffstat (limited to 'config/nrpe2/nrpe2.inc')
-rw-r--r-- | config/nrpe2/nrpe2.inc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/config/nrpe2/nrpe2.inc b/config/nrpe2/nrpe2.inc index 25964b16..7b249368 100644 --- a/config/nrpe2/nrpe2.inc +++ b/config/nrpe2/nrpe2.inc @@ -169,7 +169,6 @@ function nrpe2_custom_php_write_config() { $commands = implode($cmds); $server_port = $config['installedpackages']['nrpe2']['config'][0]['server_port']; - $server_address = $config['installedpackages']['nrpe2']['config'][0]['server_address']; $allowed_hosts = $config['installedpackages']['nrpe2']['config'][0]['allowed_hosts']; $fd = fopen(NRPE_CONFIG_DIR . '/nrpe.cfg', 'w'); @@ -177,7 +176,6 @@ function nrpe2_custom_php_write_config() { log_facility=daemon pid_file=/var/run/nrpe2.pid server_port={$server_port} -server_address={$server_address} nrpe_user=nagios nrpe_group=nagios allowed_hosts={$allowed_hosts} @@ -187,6 +185,10 @@ command_timeout=60 connection_timeout=300 {$commands} EOD; + if (defined($config['installedpackages']['nrpe2']['config'][0]['server_address'])) { + $server_address = $config['installedpackages']['nrpe2']['config'][0]['server_address']; + $nrpe_cfg .= "server_address={$server_address}"; + } fwrite($fd, $nrpe_cfg); fclose($fd); conf_mount_ro(); |