рефакторинг. Исправлен баг. если прервать локальную задачу, не удалялся файл interrupt.
This commit is contained in:
2024-01-08 20:37:16 +03:00
parent 5baf2154e2
commit fce61bf55a
26 changed files with 281 additions and 582 deletions

View File

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