1、修改nc 周期启动 不能正确执行的 bug,去掉 ./ ,第三方监测脚本 赋予 777 权限

2、修改 log4j 配置文件 error 日志不能正确输出的问题
This commit is contained in:
fangshunjian
2018-10-18 16:02:47 +08:00
parent 56d71f261a
commit 2aa74c2eb9
5 changed files with 6 additions and 19 deletions

View File

@@ -421,7 +421,8 @@ public class Common {
if (os.startsWith("Windows")) {
command = scriptFile.getCanonicalPath();
} else if (os.startsWith("Linux")) {
command = "./ " + scriptFile.getCanonicalFile();
// command = "./ " + scriptFile.getCanonicalFile();
command = scriptFile.getCanonicalPath();
}
setInfo.setProcessPath(command); // 设置执行命令
setInfo.setProcessSearchKeyCode(scriptFile.getName()); // 搜索关键字

View File

@@ -32,6 +32,7 @@ import com.nis.nmsclient.thread.task.TaskReqHandle;
import com.nis.nmsclient.util.DateUtil;
import com.nis.nmsclient.util.FileUtil;
import com.nis.nmsclient.util.FileWrUtil;
import com.nis.nmsclient.util.ProcessUtil;
import com.nis.nmsclient.util.Utils;
/**
@@ -203,7 +204,7 @@ public class SSLServer implements Runnable {
this.sendMessageByChar(SUCCESS);
this.bpReceiveFileByBath(pluginDir.getCanonicalPath());
this.sendMessageByChar(SUCCESS);
ProcessUtil.permit(777, pluginDir);//赋予执行权限
} else if(SERVER_FILE_PUSH.equalsIgnoreCase(msg)){//任务操作:文件推送
this.sendMessageByChar(SUCCESS);
String str = this.receiveMessageByChar();