1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-14 23:33:38 +00:00

Added missing FreeBSD options

This commit is contained in:
Bryan Roe
2021-12-11 23:53:57 -08:00
parent 4f43c68b56
commit 6d76fee0d9
2 changed files with 2 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@@ -516,7 +516,7 @@ function monitorinfo()
var child = require('child_process').execFile('/bin/sh', ['sh']); var child = require('child_process').execFile('/bin/sh', ['sh']);
child.stdout.str = ''; child.stdout.str = '';
child.stdout.on('data', function (chunk) { this.str += chunk.toString(); }); child.stdout.on('data', function (chunk) { this.str += chunk.toString(); });
child.stdin.write("ps " + "-e -o user" + (":999") + " -o tty -o command | grep X | "); child.stdin.write("ps " + (process.platform == 'freebsd' ? "-ax " : "") + "-e -o user" + (process.platform == 'linux' ? ":999" : "") + " -o tty -o command | grep X | ");
child.stdin.write("awk '{ "); child.stdin.write("awk '{ ");
child.stdin.write(' display="";'); child.stdin.write(' display="";');
child.stdin.write(' if($4~/^:/)'); child.stdin.write(' if($4~/^:/)');