Archiviert
1
0
Dieser Commit ist enthalten in:
yoyosource 2021-06-21 22:02:53 +02:00
Ursprung e777846c66
Commit 2fc19bc92d

Datei anzeigen

@ -239,7 +239,8 @@ public class SubserverSystem {
List<String> cmd = new ArrayList<>();
boolean jdk11 = serverJar.contains("1.15.2");
if(!steamwarStartAvailable() && lixfelStartAvailable()){
boolean notSteamwarStart = !steamwarStartAvailable();
if (notSteamwarStart && remoteStartAvailable("lx")) {
cmd.add("ssh");
cmd.add("-L");
cmd.add(port + ":localhost:" + port);
@ -247,6 +248,14 @@ public class SubserverSystem {
cmd.add("cd");
cmd.add(directory.getPath());
cmd.add(";");
} else if (notSteamwarStart && remoteStartAvailable("az")) {
cmd.add("ssh");
cmd.add("-L");
cmd.add(port + ":localhost:" + port);
cmd.add("az");
cmd.add("cd");
cmd.add(directory.getPath());
cmd.add(";");
}
if(jdk11)
@ -278,8 +287,8 @@ public class SubserverSystem {
return LoadEvaluation.getCPULoad() < 0.8 && LoadEvaluation.getRamPercentage() < 0.8;
}
private static boolean lixfelStartAvailable(){
return LoadEvaluation.getRemoteCPULoad("lx") < 0.8 && LoadEvaluation.getRemoteRamPercentage("lx") < 0.8;
private static boolean remoteStartAvailable(String remote) {
return LoadEvaluation.getRemoteCPULoad(remote) < 0.8 && LoadEvaluation.getRemoteRamPercentage(remote) < 0.8;
}
private static boolean bauRunning(ProxiedPlayer p, UUID owner){