Advertisement
Guest User

Untitled

a guest
Feb 26th, 2020
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. const os = require('os');
  2. if (os.platform() == "win32") {
  3. var free_accs_path = `${__dirname}\\control_data\\free_accs.json`;
  4. var info_path = `${__dirname}\\control_data\\info.json`;
  5. var config_path = `${__dirname}\\bots\\0\\lib\\config.json`;
  6. var config2_path = `${__dirname}\\bots\\1\\lib\\config.json`;
  7. var bot_path = `${__dirname}\\bots\\0`;
  8. var bot2_path = `${__dirname}\\bots\\1`;
  9. }
  10. else {
  11. var free_accs_path = `${__dirname}/control_data/free_accs.json`;
  12. var info_path = `${__dirname}/control_data/info.json`;
  13. var config_path = `${__dirname}/bots/0/lib/config.json`;
  14. var config2_path = `${__dirname}/bots/1/lib/config.json`;
  15. var bot_path = `${__dirname}/bots/0/`;
  16. var bot2_path = `${__dirname}/bots/1/`;
  17. }
  18. const free_accs = require(free_accs_path);
  19. const info = require(info_path);
  20. const config = require(config_path);
  21. const config2 = require(config2_path);
  22. console.log(free_accs_path, info_path, config, config2);
  23. if (os.platform() == "win32"){
  24. require('child_process').exec(`start /b npm run start --prefix ${bot_path}`);
  25. require('child_process').exec(`start /b npm run start --prefix ${bot2_path}`);
  26. } else {
  27. require('child_process').exec(`npm run start --prefix ${bot_path} &`);
  28. require('child_process').exec(`npm run start --prefix ${bot2_path} &`);
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement