librenms/config_to_json.php
Tony Murray 5f0388f0e3 Remove DB credentials from config.php
Better validation when config.php does not exist

Update docs and quote password

only populate legacy vars in config_to_json
drop .travis.yml config copy
remove credentials from config.php.default

Check for existance of .env instead of config.php in python scripts

legacy credential cleanup

tiny cleanups

consistent env for artisan server and artisan dusk
2020-06-27 07:47:08 -05:00

21 lines
352 B
PHP
Executable File

#!/usr/bin/env php
<?php
/*
* Configuration to JSON converter
* Written by Job Snijders <job@instituut.net>
*
*/
use LibreNMS\Config;
$init_modules = ['nodb'];
require __DIR__ . '/includes/init.php';
if (isCli()) {
// fill in db variables for legacy external scripts
Config::populateLegacyDbCredentials();
echo Config::toJson();
}