1
0
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:
Bryan Roe
2020-06-06 00:18:38 -07:00
parent 432c0d2585
commit 33f1e9e577
2 changed files with 14 additions and 7 deletions

View File

@@ -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() != '')