versions() added postgresql
This commit is contained in:
parent
de097b5667
commit
7ae7f876d5
@ -297,11 +297,12 @@ function versions(callback) {
|
|||||||
nginx: '',
|
nginx: '',
|
||||||
php: '',
|
php: '',
|
||||||
docker: '',
|
docker: '',
|
||||||
postfix: ''
|
postfix: '',
|
||||||
|
postgresql: ''
|
||||||
};
|
};
|
||||||
|
|
||||||
let functionProcessed = (function () {
|
let functionProcessed = (function () {
|
||||||
let totalFunctions = 16;
|
let totalFunctions = 17;
|
||||||
return function () {
|
return function () {
|
||||||
if (--totalFunctions === 0) {
|
if (--totalFunctions === 0) {
|
||||||
if (callback) {
|
if (callback) {
|
||||||
@ -453,6 +454,14 @@ function versions(callback) {
|
|||||||
}
|
}
|
||||||
functionProcessed();
|
functionProcessed();
|
||||||
});
|
});
|
||||||
|
exec('postgres -V', function (error, stdout) {
|
||||||
|
if (!error) {
|
||||||
|
const postgresql = stdout.toString().split('\n')[0].split(' ') || [];
|
||||||
|
result.postgresql = postgresql.length ? postgresql[postgresql.length - 1] : '';
|
||||||
|
result.mongodb = (result.mongodb.toLowerCase().split(',')[0] || '').replace(/[^0-9.]/g, '');
|
||||||
|
}
|
||||||
|
functionProcessed();
|
||||||
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (callback) { callback(result); }
|
if (callback) { callback(result); }
|
||||||
resolve(result);
|
resolve(result);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user