aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbenny <benjamin.von.mossner@insparx.com>2014-05-19 14:15:54 +0200
committerbenny <benjamin.von.mossner@insparx.com>2014-05-19 14:15:54 +0200
commit73c58f5e86249585449ae551476e96cd46971c6c (patch)
treeb34fe9e04fb367056751992d2c1f3ff15f194aff
parentf2a1fd070eaab580768132d27bb41da9946e0a9a (diff)
downloadpfsense-packages-73c58f5e86249585449ae551476e96cd46971c6c.tar.gz
pfsense-packages-73c58f5e86249585449ae551476e96cd46971c6c.tar.bz2
pfsense-packages-73c58f5e86249585449ae551476e96cd46971c6c.zip
nrpe server_address should be optional, so any bind works
-rw-r--r--config/nrpe2/nrpe2.inc5
-rw-r--r--config/nrpe2/nrpe2.xml3
2 files changed, 5 insertions, 3 deletions
diff --git a/config/nrpe2/nrpe2.inc b/config/nrpe2/nrpe2.inc
index 25964b16..6e5dc766 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');
@@ -187,6 +186,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>