Commit eeb8a35a authored by Ahmad's avatar Ahmad

init

parent 4ce6316e
Pipeline #195 canceled with stages
......@@ -11,6 +11,7 @@ async function run() {
try {
const data = await getTunnel();
const config = data.config;
console.log('data getter',config)
await processConfig(config);
} catch (error) {
console.error(error);
......@@ -22,9 +23,14 @@ async function processConfig(newConfig) {
const currentConfig = await fs.readFile(CONFIG_PATH, 'utf8');
if (currentConfig !== newConfig) {
console.log('config is not same try change and reload')
await fs.writeFile(CONFIG_PATH, newConfig);
await reloadHAProxy();
}
else
{
console.log('config is same')
}
} catch (error) {
throw error;
}
......
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