!7 !include once #1002615 // master() // Options for headless + big server static S vmArgs = "-XX:MaxHeapFreeRatio=70 -XX:MinHeapFreeRatio=40 -XX:+UseG1GC -Djava.awt.headless=true"; // Options for headless static S vmArgs = "-XX:MaxHeapFreeRatio=30 -XX:MinHeapFreeRatio=10 -XX:+UseG1GC -Djava.awt.headless=true"; // Options for smaller heap //static S vmArgs = "-XX:MaxHeapFreeRatio=30 -XX:MinHeapFreeRatio=10 -XX:+UseG1GC"; // Options for max speed & reactivity - some claim this might cause problems (https://developer.jboss.org/thread/228920?start=75&tstart=0) //static S vmArgs = "-server -XX:+TieredCompilation"; // Options for max longterm throughput //static S vmArgs = "-server"; // Homepage, Talk to Eleu, Web Auth, Cookies static L seedBots = litlist("#1003253", "#1002213", "#1002590", "#1002157"); sbool doSlack = false; //include #1002268 // Slack Bot !include #1002576 // Web Serving !include #1002578 // Eleu Core !include #1013904 // Eleu web socket static boolean actuallyPost = false; static S botUserName = ""; static L actualBotUserNames = litlist(); static int[] webServerPorts = {80, 8080}; static int[] httpsPorts = {443, 8443}; p { becomeBotVMIfFirst(); webInit(); eleu_webSocket_init(); if (nempty(httpsPorts)) pcall { File keystore = secretProgramFile(programID(), "keystore.jks"); S pass = loadSecretTextFileMandatory("keystore-pass").trim(); //serveHttps(httpsPort, keystore, pass); //serveHttpsWithWebsockets(httpsPort, keystore, pass, eleu_webSocket_handler()); //serveHttpsWithWebsockets_server.printServes = false; serveHttpsWithWebsockets_multiplePorts(keystore, pass, eleu_webSocket_handler(), httpsPorts); } /*if (doSlack) initSlackBot(); dediSay("Booting...");*/ coreInit(); for (S id : seedBots) call(getDispatcher(), "addSeedBot", id); /*dediSay("Yo, back online!"); if (doSlack) slackBotLoop();*/ if (hasBot("New Eleu Watch Dog.")) print("Have Eleu Watch Dog."); else { print("Starting Eleu Watch Dog."); nohupJavax(#1014075); sleepSeconds(5); } }