versions: added apache
This commit is contained in:
+9
-1
@@ -295,6 +295,7 @@ function versions(callback) {
|
||||
mysql: '',
|
||||
redis: '',
|
||||
mongodb: '',
|
||||
apache: '',
|
||||
nginx: '',
|
||||
php: '',
|
||||
docker: '',
|
||||
@@ -306,7 +307,7 @@ function versions(callback) {
|
||||
};
|
||||
|
||||
let functionProcessed = (function () {
|
||||
let totalFunctions = 19;
|
||||
let totalFunctions = 20;
|
||||
return function () {
|
||||
if (--totalFunctions === 0) {
|
||||
if (callback) {
|
||||
@@ -396,6 +397,13 @@ function versions(callback) {
|
||||
functionProcessed();
|
||||
});
|
||||
}
|
||||
exec('apachectl -v 2>&1', function (error, stdout) {
|
||||
if (!error) {
|
||||
const apache = (stdout.toString().split('\n')[0] || '').split(':');
|
||||
result.apache = (apache.length > 1 ? apache[1].replace('Apache', '').replace('/', '').trim() : '');
|
||||
}
|
||||
functionProcessed();
|
||||
});
|
||||
exec('nginx -v 2>&1', function (error, stdout) {
|
||||
if (!error) {
|
||||
const nginx = stdout.toString().split('\n')[0] || '';
|
||||
|
||||
Reference in New Issue
Block a user