mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-30 23:23:32 +00:00
updated findEnv() for freebsd
This commit is contained in:
@@ -641,7 +641,7 @@ function UserSessions()
|
||||
var child = require('child_process').execFile('/bin/sh', ['sh']);
|
||||
child.stdout.str = '';
|
||||
child.stdout.on('data', function (chunk) { this.str += chunk.toString(); });
|
||||
child.stdin.write("ps -e -o pid -o user | grep " + uname + " | awk '{ print $1 }'\nexit\n");
|
||||
child.stdin.write("ps " + (process.platform == 'freebsd' ? "-ax ":"") + "-e -o pid -o user | grep " + uname + " | awk '{ print $1 }'\nexit\n");
|
||||
child.waitExit();
|
||||
|
||||
var lines = child.stdout.str.split('\n');
|
||||
|
||||
Reference in New Issue
Block a user