1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-15 15:53:55 +00:00

fixed appWorkingDirectory() bug on freebsd

This commit is contained in:
Bryan Roe
2019-06-21 17:38:03 -07:00
parent 83fdcbc4b9
commit 4d615ab955

View File

@@ -714,7 +714,7 @@ function serviceManager()
var ret;
var child = require('child_process').execFile('/bin/sh', ['sh']);
child.stdout.str = ''; child.stdout.on('data', function (c) { this.str += c.toString(); });
child.stdin.write("cat " + this.rc + " grep " + this.name + "_chdir= | awk -F= '{ print $2 }' | awk -F\\\" '{ print $2 }'\\nexit\\n");
child.stdin.write("cat " + this.rc + " | grep " + this.name + "_chdir= | awk -F= '{ print $2 }' | awk -F\\\" '{ print $2 }'\nexit\n");
child.waitExit();
ret = child.stdout.str.trim();