From e2988e77253e8f0ad6d70e61e6c52a80dfe86f36 Mon Sep 17 00:00:00 2001 From: Aaron Daniels Date: Tue, 12 Apr 2016 07:09:33 +1000 Subject: [PATCH] - Ensure that $check_cmd is always set. - Move SQL because of upstream changes --- includes/services.inc.php | 3 ++- sql-schema/{110.sql => 112.sql} | 0 2 files changed, 2 insertions(+), 1 deletion(-) rename sql-schema/{110.sql => 112.sql} (100%) diff --git a/includes/services.inc.php b/includes/services.inc.php index 0a3f7996f..2205a4f47 100644 --- a/includes/services.inc.php +++ b/includes/services.inc.php @@ -112,6 +112,7 @@ function poll_service($service) { global $config; $update = array(); $old_status = $service['service_status']; + $check_cmd = ""; // if we have a script for this check, use it. $check_script = $config['install_dir'].'/includes/services/check_'.strtolower($service['service_type']).'.inc.php'; @@ -120,7 +121,7 @@ function poll_service($service) { } // If we do not have a cmd from the check script, build one. - if (!isset($check_cmd)) { + if ($check_cmd == "") { $check_cmd = $config['nagios_plugins'] . "/check_" . $service['service_type'] . " -H " . ($service['service_ip'] ? $service['service_ip'] : $service['hostname']); $check_cmd .= " " . $service['service_param']; } diff --git a/sql-schema/110.sql b/sql-schema/112.sql similarity index 100% rename from sql-schema/110.sql rename to sql-schema/112.sql