mirror of
https://github.com/librenms/librenms.git
synced 2024-09-21 10:28:13 +00:00
fix: config_to_json.php does not pull in database configuration settings (#6884)
This commit is contained in:
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 (php_sapi_name() == 'cli' && empty($_SERVER['REMOTE_ADDR'])) {
|
||||
$config['install_dir'] = __DIR__;
|
||||
include_once 'includes/defaults.inc.php';
|
||||
include_once 'config.php';
|
||||
if (isCli()) {
|
||||
global $config;
|
||||
echo json_encode($config);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user