Commit e8c46a5d authored by Ahmad Nemati's avatar Ahmad Nemati

init

parent 60411313
......@@ -58,7 +58,8 @@ app.listen(3000, () => console.log(`Example app listening on port 3000!`))
async function run() {
let data=await getPort()
port=parseInt(data)
let a = await shell.exec('cd .. && cd mt && sudo ./server1.sh ' + port, {silent: true}).stdout;
console.log('Reset Proxy')
}
......@@ -115,7 +116,7 @@ function randomInt(low, high) {
return Math.floor(Math.random() * (high - low) + low)
}
cron.schedule('*/10 * * * * *', () => {
cron.schedule('*/20 * * * * *', () => {
checkProcessWork()
});
......@@ -165,7 +166,7 @@ function sendRate(rx, tx) {
function getPort() {
const request = require('request');
let url = 'http://admin.fcfglobal.co:3000/getPort'
let url = 'http://admin.fcfglobal.co:3000/amzPort'
return new Promise(function (resolve, reject) {
request(url, {timeout: 15000}, function (error, res, body) {
resolve(body)
......
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