Commit version 24.12.13800

This commit is contained in:
2025-01-06 17:35:06 -05:00
parent b7f6a79c2c
commit 55d9218816
6133 changed files with 4239740 additions and 1374287 deletions

View File

@ -4,9 +4,9 @@
*
* This file is part of Observium.
*
* @package observium
* @subpackage poller
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2021 Observium Limited
* @package observium
* @subpackage poller
* @copyright (C) Adam Armstrong
*
*/
@ -15,20 +15,30 @@
chdir(dirname($argv[0]));
// Get options before definitions!
$options = getopt("o:d");
$options = getopt("o:dt");
$cload_time = microtime(TRUE);
require_once("includes/sql-config.inc.php");
if (isset($options['o'])) {
// Skip load full definitions, while not required on initial config
define('OBS_DEFINITIONS_SKIP', TRUE);
}
require_once("includes/observium.inc.php");
if (is_cli()) {
if (isset($options['o'])) {
if (!is_cli()) {
return;
}
if (isset($options['t'])) {
print_cli(OBS_PROCESS_NAME . ' Load time: ' . elapsed_time($cload_time, 4) . PHP_EOL);
exit;
}
if (isset($options['o'])) {
// get filtered options
get_config_json($options['o']);
//print_vars($options);
} else {
} else {
// All config options
get_config_json();
//print(safe_json_encode($config));
}
}
// EOF