Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

77
LINES

< > BotCompany Repo | #1024026 // Eleutheria Main for butter.botcompany.de (backup without Stefan's OS)

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Libraryless. Click here for Pure Java version (15050L/114K).

!7

!include once #1002615 // master()

// Options for headless + big server
sS vmArgs = "-XX:MaxHeapFreeRatio=70 -XX:MinHeapFreeRatio=40 -XX:+UseG1GC -Djava.awt.headless=true";

// Options for headless
//sS 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<S> seedBots = litlist("#1003253", "#1002213", "#1002590", "#1002157");

!include #1002576 // Web Serving
!include #1002578 // Eleu Core
!include #1013904 // Eleu web socket

static int[] webServerPorts = {80, 8080};
static int[] httpsPorts = {443, 8443};

p {
  botNames = litmap(
    serve := "#1014036/raw",
    img := "#1014038/raw",
    mech := #1013927,
    images := #1004590,
    eleu := "#1002213/raw",
    "eleuraw" := "#1002076/raw",
    "don-enrico" := "#1006604/raw",
    wiki := "#1007510/raw",
    jobs := "#1007647/raw",
    chess := "#1012832/raw",
    files := "#1015408/raw",
    rules := "#1017959/raw",
    jar := "#1020140/raw",
    blog := "#1016323/raw",
    pages := "#1017992/raw");
  
  print("new.");
  becomeBotVMIfFirst();
  webInit();
  
  eleu_webSocket_init();
  
  if (nempty(httpsPorts)) pcall {
    File keystore = firstFileThatExists(
      javaxSecretDir("keystore.p12"),
      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);
  }
  
  coreInit();
  
  for (S id : seedBots)
    call(getDispatcher(), "addSeedBot", id);
    
  if (hasBot("New Eleu Watch Dog."))
    print("Have Eleu Watch Dog.");
  else {
    print("Starting Eleu Watch Dog.");
    nohupJavax(#1014075);
    sleepSeconds(5);
  }
}

Author comment

Began life as a copy of #1013896

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1024026
Snippet name: Eleutheria Main for butter.botcompany.de (backup without Stefan's OS)
Eternal ID of this version: #1024026/1
Text MD5: 4220bb7ee8709a67715fc0063d5a1a9e
Transpilation MD5: 8320bef77e4ef9d4341e418209be256a
Author: stefan
Category:
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-07-17 14:53:16
Source code size: 2402 bytes / 77 lines
Pitched / IR pitched: No / No
Views / Downloads: 129 / 452
Referenced in: [show references]