mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-31 23:53:21 +00:00
Added fix for X server detection for FreeBSD
This commit is contained in:
@@ -315,7 +315,14 @@ function monitorinfo()
|
||||
var ch = require('child_process').execFile('/bin/sh', ['sh']);
|
||||
ch.stderr.on('data', function () { });
|
||||
ch.stdout.str = ''; ch.stdout.on('data', function (c) { this.str += c.toString(); });
|
||||
ch.stdin.write('ps -e | grep X\nexit\n');
|
||||
if (process.platform == 'freebsd')
|
||||
{
|
||||
ch.stdin.write('ps -ax | grep X\nexit\n');
|
||||
}
|
||||
else
|
||||
{
|
||||
ch.stdin.write('ps -e | grep X\nexit\n');
|
||||
}
|
||||
ch.waitExit();
|
||||
|
||||
if (ch.stdout.str.trim() != '')
|
||||
|
||||
Reference in New Issue
Block a user