Commit 1fd8a44d authored by bitsoko services's avatar bitsoko services 👷🏿

Update index.js

parent 0442dcc6
......@@ -255,6 +255,44 @@ child.on('close', function(code) {
}
async function setupLNPOOL(){
var child = spawn('poold --lnd.host=localhost:'+GRPCport, {
shell: true,
cwd: '/root/pool'
});
//child.stdout.setEncoding('utf8');
child.stdout.on('data', async function(data) {
//Here is where the output goes
data=data.toString();
console.log(data);
});
//child.stderr.setEncoding('utf8');
child.stderr.on('data', function(data) {
//Here is where the error output goes
data=data.toString();
console.log(data);
});
child.on('close', function(code) {
//Here you can get the exit code of the script
console.log('closing code: ' + code);
});
}
setupLNPOOL();
async function sleep(fn, par) {
return await setTimeout(async function() {
await fn(par);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment