Skip to content

Commit b4447c0

Browse files
author
thomas
committed
v1.8.0
1. 支持宝塔证书配置检测 2. 解决配置无法解析的BUG 3. 更新使用文档 4. 支持AMH面板证书配置检测 5. 解决多文件依赖问题
1 parent cda43da commit b4447c0

File tree

2 files changed

+33
-9
lines changed

2 files changed

+33
-9
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,9 @@ _acme-challenge.yourdomain.com >> 043a438043a438d40c.httpsok.com
8282

8383
```
8484

85-
生成的证书示例
86-
87-
![image-20240229164416731](https://fposter.cn/dassets/image-20240229164416731.png)
85+
## 完成
8886

87+
没错,已经结束了,证书自动续期就这么简单。
8988

9089
## 问题反馈
9190

httpsok.sh

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ __process_include() {
354354
if ($0 ~ /^#/) {
355355
356356
# Replace the include in the comment
357-
gsub("include", "import")
357+
# gsub("include", "import")
358358
359359
print original
360360
next
@@ -369,7 +369,8 @@ __process_include() {
369369
next
370370
}
371371
372-
# print "imported " $2
372+
# print "#import " $2
373+
print "#import " original
373374
374375
# system("cat " $2)
375376
# print ">> "
@@ -390,7 +391,7 @@ __process_include() {
390391
$2 = NGINX_CONFIG_HOME "/" $2
391392
}
392393
393-
print "# " original
394+
# print "# " original
394395
395396
# The second way
396397
# find . -maxdepth 1 -print0 | xargs -0 command
@@ -403,10 +404,34 @@ __process_include() {
403404
# system("ls -1 " $2 " 2>/dev/null | xargs -I {} cat {} ")
404405
405406
# Using sh has security implications deprecated
406-
system("ls -1 " $2 " 2>/dev/null | xargs -I {} sh -c \"cat {} && echo\" ")
407+
# system("ls -1 " $2 " 2>/dev/null | xargs -I {} sh -c \"cat {} && echo\" ")
407408
408409
#
409-
system("ls -1 " $2 " 2>/dev/null | xargs -I {} sed -n \"$p\" {} ")
410+
# system("ls -1 " $2 " 2>/dev/null | xargs -I {} sed -n \"$p\" {} ")
411+
412+
# xargs -I {} awk -v FP="{}" "BEGIN{ print \"# include \" FP } {print} END{print ""} " {}
413+
#system("ls -1 " $2 " 2>/dev/null | xargs -I {} awk \" {print} END {print \"\" } \" {} ")
414+
#
415+
# cmd = "ls -1 " $2 " 2>/dev/null | xargs -I {} awk \" {print} END {print \"\\\"\"\n\"\\\"\" } \" {} "
416+
417+
# cmd = "ls -1 " $2 " 2>/dev/null | xargs -I {} awk \"BEGIN {print \"\"{}\"\" } {print} END {print \n } \" {} "
418+
419+
# OK Add a newline character to the end of the file
420+
# cmd = "ls -1 " $2 " 2>/dev/null | xargs -I {} awk \" {print} END {print \"\\n\" } \" {} "
421+
422+
# OK Add a newline character to the end of the file
423+
# cmd = "ls -1 " $2 " 2>/dev/null | xargs -I {} awk '\'' {print} '\'' {} "
424+
425+
# OK add config file path
426+
#cmd = "ls -1 " $2 " 2>/dev/null | xargs -I GG awk '\'' BEGIN {print \"#included GG;\" } {print} '\'' GG "
427+
#cmd = "ls -1 " $2 " 2>/dev/null | xargs -I {} awk '\'' BEGIN {print \"#included {};\" } {print} '\'' {} "
428+
429+
430+
cmd = "ls -1 " $2 " 2>/dev/null | xargs -I {} awk '\'' BEGIN {print \"#included-begin {};\" } {print} END{ print \"#included-end {};\" } '\'' {} "
431+
432+
# print cmd
433+
system(cmd)
434+
410435
print ""
411436
412437
next
@@ -430,7 +455,7 @@ __process_include() {
430455

431456
__process_format(){
432457
cat /dev/stdin | awk -v NGINX_CONFIG="$NGINX_CONFIG:" '{
433-
gsub("import", "include")
458+
# gsub("import", "include")
434459
# print NGINX_CONFIG $0
435460
print $0
436461
}'

0 commit comments

Comments
 (0)