mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-27 08:02:51 +02:00
Three new validate.php checks
* Check that $config['install_dir'] is set correctly by checking that config.php exists there. * Check if the local branch is not master, warn that it will prevent updates * Check for modified files and list them (this will not include staged files)
This commit is contained in:
+7
-1
@@ -1041,7 +1041,13 @@ function version_info($remote=true) {
|
||||
curl_setopt($api, CURLOPT_RETURNTRANSFER, 1);
|
||||
$output['github'] = json_decode(curl_exec($api),true);
|
||||
}
|
||||
$output['local_sha'] = chop(`git rev-parse HEAD`);
|
||||
$output['local_sha'] = rtrim(`git rev-parse HEAD`);
|
||||
$output['local_branch'] = rtrim(`git rev-parse --abbrev-ref HEAD`);
|
||||
|
||||
exec('git diff --name-only --exit-code', $cmdoutput, $code);
|
||||
$output['git_modified'] = ($code !== 0);
|
||||
$output['git_modified_files'] = $cmdoutput;
|
||||
|
||||
$output['db_schema'] = dbFetchCell('SELECT version FROM dbSchema');
|
||||
$output['php_ver'] = phpversion();
|
||||
$output['mysql_ver'] = dbFetchCell('SELECT version()');
|
||||
|
||||
Reference in New Issue
Block a user