From de6020134bfde3b783291367be467baabe220bf3 Mon Sep 17 00:00:00 2001
From: aijinhui <aijinhui>
Date: Mon, 25 Dec 2023 09:56:35 +0800
Subject: [PATCH] 权限
---
ard-work/src/main/java/com/ruoyi/cmd/startup.java | 34 ++--------------------------------
1 files changed, 2 insertions(+), 32 deletions(-)
diff --git a/ard-work/src/main/java/com/ruoyi/cmd/startup.java b/ard-work/src/main/java/com/ruoyi/cmd/startup.java
index 64b60f3..8e41c40 100644
--- a/ard-work/src/main/java/com/ruoyi/cmd/startup.java
+++ b/ard-work/src/main/java/com/ruoyi/cmd/startup.java
@@ -6,6 +6,7 @@
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.ApplicationContextInitializer;
import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.core.annotation.Order;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.springframework.core.io.ResourceLoader;
@@ -44,12 +45,6 @@
String mediamtxName = "mediamtx.exe";
@Value("${mediamtx.enabled}")
Boolean mediamtxEnabled;
- //webrtc-streamer
- String webrtcName = "webrtc-streamer.exe";
- @Value("${webrtc.host}")
- String webrtcHost;
- @Value("${webrtc.enabled}")
- Boolean webrtcEnabled;
//redis
String redisName = "redis-server.exe";
@@ -77,6 +72,7 @@
}
@PostConstruct
+ @Order(1)
public void init() {
if (minioEnabled) {
log.info("初始化启动minio");
@@ -122,25 +118,6 @@
// CmdUtils.commandStart(command);
}
}
- if (webrtcEnabled) {
- log.info("初始化启动webrtc-streamer");
- if (Platform.isWindows()) {
- String exePath = System.getProperty("user.dir") + File.separator + "server" + File.separator + "webrtc" + File.separator + webrtcName;
- List<String> cmd = new ArrayList<>();
- cmd.add(exePath);
- cmd.add("-H" + webrtcHost);
- cmd.add("-o");
- if (CmdUtils.isProcessRunning(webrtcName)) {
- // 进程已经在运行,结束该进程
- CmdUtils.stopProcess(webrtcName);
- }
- // 启动后台进程
- CmdUtils.commandStart(webrtcName, cmd, null);
- // 启动cmd窗口
-// String[] command = {"cmd", "/c", "start", exePath, "-H127.0.0.1:8000", "-o"};
-// CmdUtils.commandStart(command);
- }
- }
}
@PreDestroy
@@ -157,13 +134,6 @@
if (CmdUtils.isProcessRunning(mediamtxName)) {
// 进程已经在运行,结束该进程
CmdUtils.stopProcess(mediamtxName);
- }
- }
- if (webrtcEnabled) {
- log.info("销毁webrtc-streamer");
- if (CmdUtils.isProcessRunning(webrtcName)) {
- // 进程已经在运行,结束该进程
- CmdUtils.stopProcess(webrtcName);
}
}
if (true) {
--
Gitblit v1.9.3