From a75e12b4005c435e589e0eb0abf703df5b726faf Mon Sep 17 00:00:00 2001 From: Bryan Roe Date: Sat, 22 Jun 2019 09:39:08 -0700 Subject: [PATCH] fixed indentation --- modules/service-manager.js | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/modules/service-manager.js b/modules/service-manager.js index ef5d082..4326833 100644 --- a/modules/service-manager.js +++ b/modules/service-manager.js @@ -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() {