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).

1  
!7
2  
3  
!include once #1002615 // master()
4  
5  
// Options for headless + big server
6  
sS vmArgs = "-XX:MaxHeapFreeRatio=70 -XX:MinHeapFreeRatio=40 -XX:+UseG1GC -Djava.awt.headless=true";
7  
8  
// Options for headless
9  
//sS vmArgs = "-XX:MaxHeapFreeRatio=30 -XX:MinHeapFreeRatio=10 -XX:+UseG1GC -Djava.awt.headless=true";
10  
11  
// Options for smaller heap
12  
//static S vmArgs = "-XX:MaxHeapFreeRatio=30 -XX:MinHeapFreeRatio=10 -XX:+UseG1GC";
13  
14  
// Options for max speed & reactivity - some claim this might cause problems (https://developer.jboss.org/thread/228920?start=75&tstart=0)
15  
//static S vmArgs = "-server -XX:+TieredCompilation";
16  
17  
// Options for max longterm throughput
18  
//static S vmArgs = "-server";
19  
20  
// Homepage, Talk to Eleu, Web Auth, Cookies
21  
static L<S> seedBots = litlist("#1003253", "#1002213", "#1002590", "#1002157");
22  
23  
!include #1002576 // Web Serving
24  
!include #1002578 // Eleu Core
25  
!include #1013904 // Eleu web socket
26  
27  
static int[] webServerPorts = {80, 8080};
28  
static int[] httpsPorts = {443, 8443};
29  
30  
p {
31  
  botNames = litmap(
32  
    serve := "#1014036/raw",
33  
    img := "#1014038/raw",
34  
    mech := #1013927,
35  
    images := #1004590,
36  
    eleu := "#1002213/raw",
37  
    "eleuraw" := "#1002076/raw",
38  
    "don-enrico" := "#1006604/raw",
39  
    wiki := "#1007510/raw",
40  
    jobs := "#1007647/raw",
41  
    chess := "#1012832/raw",
42  
    files := "#1015408/raw",
43  
    rules := "#1017959/raw",
44  
    jar := "#1020140/raw",
45  
    blog := "#1016323/raw",
46  
    pages := "#1017992/raw");
47  
  
48  
  print("new.");
49  
  becomeBotVMIfFirst();
50  
  webInit();
51  
  
52  
  eleu_webSocket_init();
53  
  
54  
  if (nempty(httpsPorts)) pcall {
55  
    File keystore = firstFileThatExists(
56  
      javaxSecretDir("keystore.p12"),
57  
      secretProgramFile(programID(), "keystore.jks"));
58  
    S pass = loadSecretTextFileMandatory("keystore-pass").trim();
59  
    //serveHttps(httpsPort, keystore, pass);
60  
    //serveHttpsWithWebsockets(httpsPort, keystore, pass, eleu_webSocket_handler());
61  
    //serveHttpsWithWebsockets_server.printServes = false;
62  
    serveHttpsWithWebsockets_multiplePorts(keystore, pass, eleu_webSocket_handler(), httpsPorts);
63  
  }
64  
  
65  
  coreInit();
66  
  
67  
  for (S id : seedBots)
68  
    call(getDispatcher(), "addSeedBot", id);
69  
    
70  
  if (hasBot("New Eleu Watch Dog."))
71  
    print("Have Eleu Watch Dog.");
72  
  else {
73  
    print("Starting Eleu Watch Dog.");
74  
    nohupJavax(#1014075);
75  
    sleepSeconds(5);
76  
  }
77  
}

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: 142 / 475
Referenced in: [show references]