diff --git a/servcheck_process.php b/servcheck_process.php index dce605d..e34be4f 100644 --- a/servcheck_process.php +++ b/servcheck_process.php @@ -316,7 +316,13 @@ function servcheck_run_test(array $test, bool $force): void { } if (api_plugin_is_enabled('maint')) { - require_once($config['base_path'] . '/plugins/maint/functions.php'); + if (file_exists($config['base_path'] . '/plugins/maint/includes/functions.php')) { + require_once($config['base_path'] . '/plugins/maint/includes/functions.php'); + } else if (file_exists($config['base_path'] . '/plugins/maint/functions.php')) { + require_once($config['base_path'] . '/plugins/maint/functions.php'); + } else { + cacti_log('ERROR: cannot include maint functions', false, 'SERVCHECK'); + } } if (function_exists('plugin_maint_check_servcheck_test')) { diff --git a/tests/bin/patch-coverage.php b/tests/bin/patch-coverage.php index f9b08b2..6c567ed 100644 --- a/tests/bin/patch-coverage.php +++ b/tests/bin/patch-coverage.php @@ -162,6 +162,7 @@ function changed_lines($base_ref) { $unmeasured_allowlist = [ 'servcheck_ca.php', // web UI entry point (require auth.php); not loadable in the isolated unit process 'servcheck_credential.php', // web UI entry point (require auth.php); not loadable in the isolated unit process + 'servcheck_process.php', // CLI/daemon poller entry point (shebang, chdir + include, pcntl signal handling); not loadable in the isolated unit process 'servcheck_proxy.php', // web UI entry point (require auth.php); not loadable in the isolated unit process 'servcheck_restapi.php', // web UI entry point (require auth.php); not loadable in the isolated unit process 'servcheck_test.php', // web UI entry point (require auth.php); not loadable in the isolated unit process