From 73c58f5e86249585449ae551476e96cd46971c6c Mon Sep 17 00:00:00 2001 From: benny Date: Mon, 19 May 2014 14:15:54 +0200 Subject: nrpe server_address should be optional, so any bind works --- config/nrpe2/nrpe2.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'config/nrpe2/nrpe2.inc') 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(); -- cgit v1.2.3 From ea71cc70a88a4a4a7f2109d426bc029712b14c4b Mon Sep 17 00:00:00 2001 From: benny Date: Fri, 23 May 2014 16:58:55 +0200 Subject: fix duplicate definition of server_address --- config/nrpe2/nrpe2.inc | 1 - 1 file changed, 1 deletion(-) (limited to 'config/nrpe2/nrpe2.inc') diff --git a/config/nrpe2/nrpe2.inc b/config/nrpe2/nrpe2.inc index 6e5dc766..7b249368 100644 --- a/config/nrpe2/nrpe2.inc +++ b/config/nrpe2/nrpe2.inc @@ -176,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} -- cgit v1.2.3