abiosoft / abiosoft/caddy-exec

exec startup ignored in global block on Windows 11 despite documentation

Đang mở
#26 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Go
Star
155
Fork
21
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Hello,

I'm using Caddy v2.10.0 h1 on Windows 11 version 24H2.

I noticed that when placing an exec directive with startup in the global block of the Caddyfile, the command is never executed, even though the documentation states that startup and shutdown hooks are supported in the global block.

However, the exec directive with shutdown in the global block works as expected.

Here is a minimal reproducible example:

`caddyfile`
```
{
email user@example.com

exec "C:\\test\\start.bat" {
startup
}

exec "C:\\test\\stop.bat" {
shutdown
}
}
```

`start.bat` contains:
```
@ECHO OFF
echo [%date% %time%] start started >> C:\test\exec.log
```
Expected behavior:
Both exec directives with startup and shutdown in the global block should be executed.

Actual behavior:
Only the shutdown command in the global block is executed; the startup one is silently ignored. BUT the shudtdown command is executed during startup...

Environment:

OS: Windows 11 24H2

Caddy version: v2.10.0 h1

http.handlers.exec plugin installed and active.

Everything is working correctly in Caddy v2.7.6 h1

Please let me know if more logs or info are needed.

Thank you!

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.