aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-05-23 12:10:32 -0300
committerRenato Botelho <garga@FreeBSD.org>2014-05-23 12:10:32 -0300
commit43ada8b18995da67474cc5e7f155d23c30b2e9a0 (patch)
tree7a58be3056b7b14600d86e57feebbf16acd6c3e5
parent8ba84ead554bffa9cc697a2989be196b06c1b0cd (diff)
parentea71cc70a88a4a4a7f2109d426bc029712b14c4b (diff)
downloadpfsense-packages-43ada8b18995da67474cc5e7f155d23c30b2e9a0.tar.gz
pfsense-packages-43ada8b18995da67474cc5e7f155d23c30b2e9a0.tar.bz2
pfsense-packages-43ada8b18995da67474cc5e7f155d23c30b2e9a0.zip
Merge pull request #663 from gitbensons/master
-rw-r--r--config/nrpe2/nrpe2.inc6
-rw-r--r--config/nrpe2/nrpe2.xml3
2 files changed, 5 insertions, 4 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();
diff --git a/config/nrpe2/nrpe2.xml b/config/nrpe2/nrpe2.xml
index 8d65c97b..fec09d06 100644
--- a/config/nrpe2/nrpe2.xml
+++ b/config/nrpe2/nrpe2.xml
@@ -52,9 +52,8 @@
<field>
<fielddescr>Bind IP Address</fielddescr>
<fieldname>server_address</fieldname>
- <description>Set this to the IP address of the interface you want the daemon to listen on.</description>
+ <description>Set this to the IP address of the interface you want the daemon to listen on. (optional)</description>
<type>input</type>
- <required/>
</field>
<field>
<fielddescr>Nagios Server(s)</fielddescr>