1、修改nc 周期启动 不能正确执行的 bug,去掉 ./ ,第三方监测脚本 赋予 777 权限
2、修改 log4j 配置文件 error 日志不能正确输出的问题
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
/bin
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
log4j.rootLogger = debug,stdout,logfile
|
|
||||||
|
|
||||||
log4j.appender.stdout = org.apache.log4j.ConsoleAppender
|
|
||||||
log4j.appender.stdout.layout.ConversionPattern = %d %p [%c] [%t] - <%m>%n
|
|
||||||
log4j.appender.stdout.layout = org.apache.log4j.PatternLayout
|
|
||||||
|
|
||||||
#----------------------debug---------------------
|
|
||||||
|
|
||||||
log4j.appender.logfile = org.apache.log4j.RollingFileAppender
|
|
||||||
log4j.appender.logfile.MaxFileSize = 50MB
|
|
||||||
log4j.appender.logfile.MaxBackupIndex = 20
|
|
||||||
|
|
||||||
log4j.appender.logfile.File = ./nc_logs/nmsclient.log
|
|
||||||
log4j.appender.logfile.layout.ConversionPattern = %d %p [%c] [%t] - <%m>%n
|
|
||||||
log4j.appender.logfile.layout = org.apache.log4j.PatternLayout
|
|
||||||
@@ -421,7 +421,8 @@ public class Common {
|
|||||||
if (os.startsWith("Windows")) {
|
if (os.startsWith("Windows")) {
|
||||||
command = scriptFile.getCanonicalPath();
|
command = scriptFile.getCanonicalPath();
|
||||||
} else if (os.startsWith("Linux")) {
|
} else if (os.startsWith("Linux")) {
|
||||||
command = "./ " + scriptFile.getCanonicalFile();
|
// command = "./ " + scriptFile.getCanonicalFile();
|
||||||
|
command = scriptFile.getCanonicalPath();
|
||||||
}
|
}
|
||||||
setInfo.setProcessPath(command); // 设置执行命令
|
setInfo.setProcessPath(command); // 设置执行命令
|
||||||
setInfo.setProcessSearchKeyCode(scriptFile.getName()); // 搜索关键字
|
setInfo.setProcessSearchKeyCode(scriptFile.getName()); // 搜索关键字
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ import com.nis.nmsclient.thread.task.TaskReqHandle;
|
|||||||
import com.nis.nmsclient.util.DateUtil;
|
import com.nis.nmsclient.util.DateUtil;
|
||||||
import com.nis.nmsclient.util.FileUtil;
|
import com.nis.nmsclient.util.FileUtil;
|
||||||
import com.nis.nmsclient.util.FileWrUtil;
|
import com.nis.nmsclient.util.FileWrUtil;
|
||||||
|
import com.nis.nmsclient.util.ProcessUtil;
|
||||||
import com.nis.nmsclient.util.Utils;
|
import com.nis.nmsclient.util.Utils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -203,7 +204,7 @@ public class SSLServer implements Runnable {
|
|||||||
this.sendMessageByChar(SUCCESS);
|
this.sendMessageByChar(SUCCESS);
|
||||||
this.bpReceiveFileByBath(pluginDir.getCanonicalPath());
|
this.bpReceiveFileByBath(pluginDir.getCanonicalPath());
|
||||||
this.sendMessageByChar(SUCCESS);
|
this.sendMessageByChar(SUCCESS);
|
||||||
|
ProcessUtil.permit(777, pluginDir);//赋予执行权限
|
||||||
} else if(SERVER_FILE_PUSH.equalsIgnoreCase(msg)){//任务操作:文件推送
|
} else if(SERVER_FILE_PUSH.equalsIgnoreCase(msg)){//任务操作:文件推送
|
||||||
this.sendMessageByChar(SUCCESS);
|
this.sendMessageByChar(SUCCESS);
|
||||||
String str = this.receiveMessageByChar();
|
String str = this.receiveMessageByChar();
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
log4j.rootLogger = debug,stdout,logfile
|
log4j.rootLogger = debug,stdout,logfile,errorLog
|
||||||
|
|
||||||
log4j.appender.stdout = org.apache.log4j.ConsoleAppender
|
log4j.appender.stdout = org.apache.log4j.ConsoleAppender
|
||||||
log4j.appender.stdout.layout.ConversionPattern = %d %p [%l] [%t] - <%m>%n
|
log4j.appender.stdout.layout.ConversionPattern = %d %p [%l] [%t] - <%m>%n
|
||||||
@@ -15,7 +15,6 @@ log4j.appender.logfile.layout.ConversionPattern = %d %p [%l] [%t] - <%m>%n
|
|||||||
log4j.appender.logfile.layout = org.apache.log4j.PatternLayout
|
log4j.appender.logfile.layout = org.apache.log4j.PatternLayout
|
||||||
|
|
||||||
#----------------------error---------------------
|
#----------------------error---------------------
|
||||||
log4j.logger.errorLog = warn,errorLog
|
|
||||||
log4j.appender.errorLog = org.apache.log4j.RollingFileAppender
|
log4j.appender.errorLog = org.apache.log4j.RollingFileAppender
|
||||||
log4j.appender.errorLog.MaxFileSize = 50MB
|
log4j.appender.errorLog.MaxFileSize = 50MB
|
||||||
log4j.appender.errorLog.Append = true
|
log4j.appender.errorLog.Append = true
|
||||||
|
|||||||
Reference in New Issue
Block a user