1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-26 05:03:15 +00:00

fixed indentation

This commit is contained in:
Bryan Roe
2019-06-22 09:39:08 -07:00
parent 894c4e7a7e
commit a75e12b400

View File

@@ -732,19 +732,19 @@ function serviceManager()
child.stdout.str = ''; child.stdout.on('data', function (c) { this.str += c.toString(); });
child.stdin.write("cat " + this.rc + " | grep command= | awk -F= '{ print $2 }' | awk -F\\\" '{ print $2 }'\nexit\n");
child.waitExit();
var tmp = child.stdout.str.trim().split('${name}').join(this.name);
if(tmp=='/usr/sbin/daemon')
{
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 command_args= | awk -F"-f " \'{ $1=""; split($0, res, "\\""); split(res[1], t, " "); print t[1]; }\'\nexit\n');
child.waitExit();
return(child.stdout.str.trim());
}
else
{
return(tmp);
}
var tmp = child.stdout.str.trim().split('${name}').join(this.name);
if(tmp=='/usr/sbin/daemon')
{
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 command_args= | awk -F"-f " \'{ $1=""; split($0, res, "\\""); split(res[1], t, " "); print t[1]; }\'\nexit\n');
child.waitExit();
return(child.stdout.str.trim());
}
else
{
return(tmp);
}
};
ret.isRunning = function isRunning()
{