mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fix a couple of validation items (#9154)
- Ignore .pki/nssdb. This happens when /opt/librenms is set as the home directory of the librenms users, personally, I would suggest adding cd /opt/librenms in ./bashrc (or equivalent) instead. - fix validate when db connection fails. DO NOT DELETE THIS TEXT #### Please note > Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting. - [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/) #### Testers If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
This commit is contained in:
committed by
Neil Lathwood
parent
4bb9ac7797
commit
06a7cb2412
@@ -74,6 +74,7 @@ class User extends BaseValidation
|
||||
"$dir/storage/framework/sessions/",
|
||||
"$dir/storage/framework/views/",
|
||||
"$dir/storage/debugbar/",
|
||||
"$dir/.pki/", // ignore files/folders created by setting the librenms home directory to the install directory
|
||||
);
|
||||
|
||||
$files = array_filter(explode(PHP_EOL, $find_result), function ($file) use ($ignore_files) {
|
||||
|
@@ -143,7 +143,7 @@ if (!file_exists(Config::get('install_dir').'/config.php')) {
|
||||
if (\LibreNMS\DB\Eloquent::isConnected()) {
|
||||
$validator->ok('Database connection successful', null, 'database');
|
||||
} else {
|
||||
$validator->fail('Error connecting to your database. '.$e->getMessage(), null, 'database');
|
||||
$validator->fail('Error connecting to your database.', null, 'database');
|
||||
}
|
||||
|
||||
Config::load();
|
||||
|
Reference in New Issue
Block a user