mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix: config_to_json.php does not pull in database configuration settings (#6884)
This commit is contained in:
committed by
Neil Lathwood
parent
62cde819a0
commit
daff16fabb
@@ -7,12 +7,10 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
chdir(__DIR__); // cwd to the directory containing this script
|
$init_modules = array();
|
||||||
|
require __DIR__ . '/includes/init.php';
|
||||||
|
|
||||||
// check if we are running through the CLI, otherwise abort
|
if (isCli()) {
|
||||||
if (php_sapi_name() == 'cli' && empty($_SERVER['REMOTE_ADDR'])) {
|
global $config;
|
||||||
$config['install_dir'] = __DIR__;
|
|
||||||
include_once 'includes/defaults.inc.php';
|
|
||||||
include_once 'config.php';
|
|
||||||
echo json_encode($config);
|
echo json_encode($config);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user