Merge branch 'master' of ssh://184.154.0.242:7999/min/Mineplex
This commit is contained in:
commit
36cbe55a49
@ -275,10 +275,13 @@ public class DDoSProtectionSwitcher
|
|||||||
private static void switchServer(final String privateIp, String currentIp, String newIp, String currentGateway,
|
private static void switchServer(final String privateIp, String currentIp, String newIp, String currentGateway,
|
||||||
String newGateway)
|
String newGateway)
|
||||||
{
|
{
|
||||||
String cmd = "/home/mineplex/switchBungeeIp.sh";
|
String cmd = "/usr/bin/ssh";
|
||||||
|
String args = "-to StrictHostKeyChecking=no -o ServerAliveInterval=10 mineplex@" + privateIp + " -p 5191";
|
||||||
|
String remoteCmd = "\"sh /home/mineplex/config/switchBungeeIpRemote.sh";
|
||||||
|
String remoteCmdEnd = "\"";
|
||||||
|
|
||||||
ProcessRunner pr = new ProcessRunner(new String[] { "/bin/sh", cmd, privateIp, currentIp, newIp,
|
ProcessRunner pr = new ProcessRunner(new String[] { cmd, args, remoteCmd, currentIp, newIp,
|
||||||
currentGateway, newGateway });
|
currentGateway, newGateway, remoteCmdEnd });
|
||||||
pr.start(new GenericRunnable<Boolean>()
|
pr.start(new GenericRunnable<Boolean>()
|
||||||
{
|
{
|
||||||
public void run(Boolean error)
|
public void run(Boolean error)
|
||||||
|
Loading…
Reference in New Issue
Block a user