diff --git a/CPF_Cef/MainModel.cs b/CPF_Cef/MainModel.cs index 22ed378..475c126 100644 --- a/CPF_Cef/MainModel.cs +++ b/CPF_Cef/MainModel.cs @@ -55,6 +55,8 @@ namespace AKS.EnterpriseLibrary.WebBrowser //读取参数 if (content != "ping" && !string.IsNullOrEmpty(content)) { + //检测服务是否启动 + StartShll(); //返回内容 string result = string.Empty; content = Base64str2(content); @@ -1876,10 +1878,45 @@ namespace AKS.EnterpriseLibrary.WebBrowser return ""; } - public static string StartShll() + /// + /// 启动服务 + /// + public static void StartShll() { - string commod = "lsof -i:9039"; - return ""; + try + { + if (true) + { + //启动身份证、签字版、指纹服务 + string commod = "lsof -i:9399"; + string zxjg = Bash(commod); + if (string.IsNullOrEmpty(zxjg)) + { + commod = "cd /opt/apps/yfzy/bin && ./FiveInchServer-yfzy.sh"; + Bash(commod); + } + } + + if (true) + { + //启动高拍仪服务 + string commod = "netstat -tuln | grep 6543"; + string zxjg = Bash(commod); + if (string.IsNullOrEmpty(zxjg)) + { + commod = "cd /opt/hCamera && ./start.sh"; + Bash(commod); + //获取设备 + GetSnIndex(); + //打开高拍仪 + if (OpenSn(Parame.gpydevIndex) == "200") { Parame.isGPY = true; } + //开启/关闭纠偏显示 + EnableDeskImage(1); + } + } + } + catch { } + finally { } } } }