mirror of
https://github.com/ME1312/SubServers-2.git
synced 2025-01-10 18:07:54 +01:00
#35 Add address
variable to creator/server executable
This commit is contained in:
parent
75a872252f
commit
8b77434ccf
@ -90,6 +90,7 @@ public class InternalSubCreator extends SubCreator {
|
||||
var.put("template", template.getName());
|
||||
var.put("type", template.getType().toString().toUpperCase());
|
||||
var.put("version", version.toString());
|
||||
var.put("address", host.getAddress().getHostAddress());
|
||||
var.put("port", Integer.toString(port));
|
||||
switch (template.getType()) {
|
||||
case SPONGE:
|
||||
|
@ -121,6 +121,7 @@ public class InternalSubServer extends SubServerContainer {
|
||||
try {
|
||||
ProcessBuilder pb = new ProcessBuilder().command(Executable.parse(host.getCreator().getBashDirectory(), executable)).directory(directory);
|
||||
pb.environment().put("name", getName());
|
||||
pb.environment().put("address", host.getAddress().getHostAddress());
|
||||
pb.environment().put("port", Integer.toString(getAddress().getPort()));
|
||||
process = pb.start();
|
||||
System.out.println("SubServers > Now starting " + getName());
|
||||
|
@ -235,6 +235,7 @@ public class SubCreator {
|
||||
var.put("template", template.getName());
|
||||
var.put("type", template.getType().toString().toUpperCase());
|
||||
var.put("version", version.toString());
|
||||
var.put("address", host.config.get().getSection("Settings").getRawString("Server-Bind"));
|
||||
var.put("port", Integer.toString(port));
|
||||
switch (template.getType()) {
|
||||
case SPONGE:
|
||||
|
@ -110,6 +110,7 @@ public class SubServer {
|
||||
try {
|
||||
ProcessBuilder pb = new ProcessBuilder().command(Executable.parse(host.host.getRawString("Git-Bash"), executable)).directory(directory);
|
||||
pb.environment().put("name", getName());
|
||||
pb.environment().put("address", host.config.get().getSection("Settings").getRawString("Server-Bind"));
|
||||
pb.environment().put("port", Integer.toString(getPort()));
|
||||
process = pb.start();
|
||||
falsestart = false;
|
||||
|
Loading…
Reference in New Issue
Block a user