v++
рефакторинг. Исправлен баг. если прервать локальную задачу, не удалялся файл interrupt.
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Utils.Utils;
|
||||
import GlobalData.RemoteFile.RemoteFile;
|
||||
import Visual_DVM_2021.Passes.SSH.CurrentConnectionPass;
|
||||
public class RemoteSingleCommand extends CurrentConnectionPass<String> {
|
||||
String command = "";
|
||||
@@ -12,6 +14,10 @@ public class RemoteSingleCommand extends CurrentConnectionPass<String> {
|
||||
}
|
||||
@Override
|
||||
protected void ServerAction() throws Exception {
|
||||
target = ShellCommand(command);
|
||||
RemoteFile file = new RemoteFile(user.connection.sftpChannel.getHome(), Utils.getDateName("out"));
|
||||
user.connection.ShellCommand(command+" 1>"+Utils.DQuotes(file.full_name));
|
||||
if (user.connection.Exists(file)){
|
||||
target = user.connection.readFromFile(file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user