Skip to content

Commit 80c8f99

Browse files
committed
1
1 parent f9578e4 commit 80c8f99

6 files changed

Lines changed: 20 additions & 12 deletions

File tree

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM alpine:3.21
1+
FROM alpine:3.22
22
ENV LANG=zh_CN.UTF-8 \
33
TZ=Asia/Shanghai \
44
PS1="\u@\h:\w \$ "

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@ Path : JDK安装目录\bin
111111

112112
```
113113
Linux: mkdir /home/nginxWebUI/
114-
wget -O /home/nginxWebUI/nginxWebUI.jar https://gitee.com/cym1102/nginxWebUI/releases/download/4.3.1/nginxWebUI-4.3.1.jar
114+
wget -O /home/nginxWebUI/nginxWebUI.jar https://gitee.com/cym1102/nginxWebUI/releases/download/4.3.2/nginxWebUI-4.3.2.jar
115115
116-
Windows: 直接使用浏览器下载 https://gitee.com/cym1102/nginxWebUI/releases/download/4.3.1/nginxWebUI-4.3.1.jar 到 D:/home/nginxWebUI/nginxWebUI.jar
116+
Windows: 直接使用浏览器下载 https://gitee.com/cym1102/nginxWebUI/releases/download/4.3.2/nginxWebUI-4.3.2.jar 到 D:/home/nginxWebUI/nginxWebUI.jar
117117
```
118118

119119
有新版本只需要修改路径中的版本即可

README_EN.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ reboot
107107

108108
```
109109
Linux: mkdir /home/nginxWebUI/
110-
wget -O /home/nginxWebUI/nginxWebUI.jar https://gitee.com/cym1102/nginxWebUI/releases/download/4.3.1/nginxWebUI-4.3.1.jar
110+
wget -O /home/nginxWebUI/nginxWebUI.jar https://gitee.com/cym1102/nginxWebUI/releases/download/4.3.2/nginxWebUI-4.3.2.jar
111111
112-
Windows: Download directly from your browser https://gitee.com/cym1102/nginxWebUI/releases/download/4.3.1/nginxWebUI-4.3.1.jar into D:/home/nginxWebUI/
112+
Windows: Download directly from your browser https://gitee.com/cym1102/nginxWebUI/releases/download/4.3.2/nginxWebUI-4.3.2.jar into D:/home/nginxWebUI/
113113
```
114114

115115
With a new version, you just need to change the version in the path

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<modelVersion>4.0.0</modelVersion>
1212
<groupId>com.cym</groupId>
1313
<artifactId>nginxWebUI</artifactId>
14-
<version>4.3.1</version>
14+
<version>4.3.2</version>
1515

1616
<properties>
1717
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

src/main/java/com/cym/controller/adminPage/CertController.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,8 @@ private String getKey(String rs) {
290290
private String getPem(String rs) {
291291
String[] lines = rs.split("\n");
292292
for (String line : lines) {
293-
if (line.contains("And the full chain certs is there:")) {
294-
return line.split("And the full chain certs is there:")[1].trim().replace("\\", "/").replace("//", "/");
293+
if (line.contains("And the full-chain cert is in:")) {
294+
return line.split("And the full-chain cert is in:")[1].trim().replace("\\", "/").replace("//", "/");
295295
}
296296
}
297297

@@ -328,8 +328,12 @@ private String[] getEnv(Cert cert) {
328328
}
329329
if (cert.getDnsType().equals("cfToken")) {
330330
list.add("CF_Token=" + cert.getCfToken());
331-
list.add("CF_Account_ID=" + cert.getCfAccountId());
332-
list.add("CF_Zone_ID=" + cert.getCfZoneId());
331+
if (StrUtil.isNotEmpty(cert.getCfAccountId())) {
332+
list.add("CF_Account_ID=" + cert.getCfAccountId());
333+
}
334+
if (StrUtil.isNotEmpty(cert.getCfZoneId())) {
335+
list.add("CF_Zone_ID=" + cert.getCfZoneId());
336+
}
333337
}
334338
if (cert.getDnsType().equals("gd")) {
335339
list.add("GD_Key=" + cert.getGdKey());

src/main/java/com/cym/utils/TimeExeUtils.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,11 @@ public String execCMD(String cmd, String[] envs, long timeout) {
3838
ProcessBuilder processBuilder = new ProcessBuilder("/bin/sh", "-c", cmd);
3939
Map<String, String> environmentMap = processBuilder.environment();
4040
for (String env : envs) {
41-
environmentMap.put(env.split("=")[0], env.split("=")[1]);
41+
String[] arrays = env.split("=");
42+
String key = arrays.length > 0 ? arrays[0] : "";
43+
String value = arrays.length > 1 ? arrays[1] : "";
44+
45+
environmentMap.put(key, value);
4246
}
4347
processBuilder.redirectErrorStream(true);// 将错误流中的数据合并到输入流
4448
process = processBuilder.start();
@@ -60,7 +64,7 @@ public String execCMD(String cmd, String[] envs, long timeout) {
6064
process.exitValue();
6165
break;
6266
} catch (IllegalThreadStateException e) {
63-
//System.err.println(e.getMessage());
67+
// System.err.println(e.getMessage());
6468
}
6569
}
6670

0 commit comments

Comments
 (0)