Merge branch 'master' of ssh://184.154.0.242:7999/min/Mineplex

This commit is contained in:
Jonathan Williams 2014-09-29 12:13:08 -07:00
commit 36cbe55a49
1 changed files with 6 additions and 3 deletions

View File

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