Commit fdef6073 authored by nilanjandaw's avatar nilanjandaw

ip parsing bug fix

parent e7f11511
{"id":"","master_node":"10.129.6.5"}
\ No newline at end of file
{"id":"src","master_node":"10.129.6.5"}
\ No newline at end of file
......@@ -13,9 +13,12 @@ function updateConfig() {
console.log(err);
process.exit(1);
}
let data = getIP.stdout.toString().trim().split(' ')
let data = getIP.stdout.toString().trim()
data = data.substr(0, data.indexOf("\n")).trim()
data = data.split(' ')
console.log(data);
file.id = data[data.length - 3]
file.id = data[data.length - 4]
fs.writeFileSync('./config.json', JSON.stringify(file));
console.log("Updated Config file");
}
......
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