summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/org/openslx/taskmanager/tasks/WakeOnLan.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/openslx/taskmanager/tasks/WakeOnLan.java b/src/main/java/org/openslx/taskmanager/tasks/WakeOnLan.java
index 17780b5..22f9f69 100644
--- a/src/main/java/org/openslx/taskmanager/tasks/WakeOnLan.java
+++ b/src/main/java/org/openslx/taskmanager/tasks/WakeOnLan.java
@@ -124,7 +124,7 @@ public class WakeOnLan extends AbstractTask
SshData sshData = this.ssh.get( method );
status.addMsg( jobId + ": Waking via SSH to " + sshData.ip + ": " + macString );
String command = sshData.command.replace( "%MACS%", macString ).replace( "%IP%", ip );
- RemoteExec.Client c = new RemoteExec.Client( "x", sshData.ip, sshData.port, sshData.username );
+ RemoteExec.Client c = new RemoteExec.Client( null, sshData.ip, sshData.port, sshData.username );
RemoteExec task = new RemoteExec( new RemoteExec.Client[] { c }, sshData.sshkey, sshData.port, command, 5 );
task.execute();
Output s = task.getStatusObject();
@@ -134,7 +134,7 @@ public class WakeOnLan extends AbstractTask
if ( !Util.isEmpty( s.error ) ) {
status.addMsg( s.error );
}
- if ( s.result != null && s.result.containsKey( "x" ) && s.result.get( "x" ).exitCode == 0 ) {
+ if ( s.result != null && s.result.containsKey( sshData.ip ) && s.result.get( sshData.ip ).exitCode == 0 ) {
markSuccess( macs );
status.addMsg( jobId + ": Done" );
} else {