diff --git a/index.js b/index.js index c032a93..d2a7349 100644 --- a/index.js +++ b/index.js @@ -64,10 +64,12 @@ async function updateProxy() { } services = services.sort(sortFn); + let configString = template({services, nodes, info}); + // Cheking settings hash let infoHash = shajs('sha256') - .update(JSON.stringify({services, nodes})) + .update(configString) .digest('hex'); console.log('Settings hash:', infoHash); @@ -79,7 +81,6 @@ async function updateProxy() { // Creating configuration file let tmpConf = `${tmpDir}/config.cfg`; - let configString = template({services, nodes, info}); fs.writeFileSync(tmpConf, configString); if (conf.debug) {