diff options
author | jim-p <jimp@pfsense.org> | 2011-09-12 13:50:36 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2011-09-12 13:50:36 -0400 |
commit | 0e57591001f43c0721a5f95f7a9e53451f4b5869 (patch) | |
tree | 30fba5b1379dd5d78d06e7ca40e7f47c9a5f028d /config/nrpe2 | |
parent | e13a0e5df4e9eb3852d665b45ff12067b47df8ba (diff) | |
download | pfsense-packages-0e57591001f43c0721a5f95f7a9e53451f4b5869.tar.gz pfsense-packages-0e57591001f43c0721a5f95f7a9e53451f4b5869.tar.bz2 pfsense-packages-0e57591001f43c0721a5f95f7a9e53451f4b5869.zip |
Declare this array before use, otherwise if no commands are found the implode() below the loop will fail. (nrpe2)
Diffstat (limited to 'config/nrpe2')
-rw-r--r-- | config/nrpe2/nrpe2.inc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/config/nrpe2/nrpe2.inc b/config/nrpe2/nrpe2.inc index 3bc97b21..2d136c3a 100644 --- a/config/nrpe2/nrpe2.inc +++ b/config/nrpe2/nrpe2.inc @@ -143,6 +143,7 @@ function nrpe2_custom_php_write_config() { global $g, $config, $nagios_check_path; conf_mount_rw(); + $cmds = array(); foreach ($config['installedpackages']['nrpe2']['config'][0]['row'] as $cmd) { if (is_executable("{$nagios_check_path}/{$cmd['command']}")) $cmds[] = "command[{$cmd['name']}]={$nagios_check_path}/{$cmd['command']} -w {$cmd['warning']} -c {$cmd['critical']} {$cmd['extra']}\n"; |